Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 159
    • Issues 159
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Issues
  • #53

Closed
Open
Opened Nov 25, 2020 by delanoe@anoe
  • Report abuse
  • New issue
Report abuse New issue

Functional Dependency issue in refactoring

the function groupWithStem_Double should be polymorphic (a instead of Double) as written in the code here: https://gitlab.iscpif.fr/gargantext/haskell-gargantext/blob/dev-social-list/src/Gargantext/Core/Text/List/Group/WithStem.hs#L60

But I got the error:

src/Gargantext/Core/Text/List/Group/WithStem.hs:146:32: error: • Couldn't match type ‘a2’ with ‘a’ arising from a functional dependency between: constraint ‘Control.Monad.Reader.Class.MonadReader (FlowCont Text (GroupedTreeScores a2)) ((->) (FlowCont Text (GroupedTreeScores a)))’ arising from a use of ‘view’ instance ‘Control.Monad.Reader.Class.MonadReader r ((->) r)’ at ‘a2’ is a rigid type variable bound by the type signature for: cont' :: forall a2. [(Text, GroupedTreeScores a2)] at src/Gargantext/Core/Text/List/Group/WithStem.hs:145:9-46 ‘a’ is a rigid type variable bound by the type signature for: mergeWith_a :: forall a. (Text -> Text) -> FlowCont Text (GroupedTreeScores a) -> FlowCont Text (GroupedTreeScores a) at src/Gargantext/Core/Text/List/Group/WithStem.hs:(135,1)-(137,48) • In the second argument of ‘($)’, namely ‘view flc_cont flc’ In the expression: Map.toList $ view flc_cont flc In an equation for ‘cont'’: cont' = Map.toList $ view flc_cont flc • Relevant bindings include cont' :: [(Text, GroupedTreeScores a2)] (bound at src/Gargantext/Core/Text/List/Group/WithStem.hs:146:9) flc :: FlowCont Text (GroupedTreeScores a) (bound at src/Gargantext/Core/Text/List/Group/WithStem.hs:138:17) mergeWith_a :: (Text -> Text) -> FlowCont Text (GroupedTreeScores a) -> FlowCont Text (GroupedTreeScores a) (bound at src/Gargantext/Core/Text/List/Group/WithStem.hs:138:1) | 146 | cont' = Map.toList $ view flc_cont flc

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext#53