Commit 6be5050a authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX:Warnings]

parent 52e20122
......@@ -42,11 +42,11 @@ toGroupedText groupParams scores =
------------------------------------------------------------------------
-- toGroupedText_test :: Bool -- Map Stem (GroupedText Int)
-- | WIP
toGroupedText_test :: Bool -- Map Stem (GroupedText Int)
toGroupedText_test =
-- fromGroupedScores $ fromListScores from
toGroupedText params from datas -- == result
toGroupedText params from datas == result
where
params = GroupedTextParams identity (Set.size . snd) fst snd
from :: Map Text FlowListScores
......@@ -88,7 +88,7 @@ toGroupedText_test =
,_gt_children = Set.fromList ["A. Rahmani","B. Tamain"]
,_gt_size = 2
,_gt_stem = "T. Reposeur"
,_gt_nodes = Set.fromList [3,4]
,_gt_nodes = Set.fromList [1..6]
}
)
]
......
......@@ -94,14 +94,14 @@ addIfNotExist :: Map Text FlowListScores
-> Map Text (Set NodeId)
-> Map Text (GroupedTextScores (Set NodeId))
addIfNotExist mapSocialScores mapScores =
foldl' (addIfNotExist' mapSocialScores mapScores) Map.empty $ Map.toList mapScores
foldl' (addIfNotExist' mapSocialScores) Map.empty $ Map.toList mapScores
where
addIfNotExist' mss ms m (t,ns) =
addIfNotExist' mss m (t,ns) =
case Map.lookup t mss of
Nothing -> Map.alter (add (t,ns)) t m
Nothing -> Map.alter (add ns) t m
_ -> m
add (t,ns) Nothing = Just $ GroupedTextScores Nothing ns Set.empty
add ns' Nothing = Just $ GroupedTextScores Nothing ns' Set.empty
add _ _ = Nothing -- should not be present
......
......@@ -89,12 +89,12 @@ flowSocialList' flowPriority user nt ngrams' =
------------------------------------------------------------------------
flowSocialListByMode :: ( RepoCmdM env err m
, CmdM env err m
, HasNodeError err
, HasTreeError err
)
=> [NodeId]-> NgramsType -> Set Text
-> m (Map (Maybe ListType) (Set Text))
, CmdM env err m
, HasNodeError err
, HasTreeError err
)
=> [NodeId]-> NgramsType -> Set Text
-> m (Map (Maybe ListType) (Set Text))
flowSocialListByMode [] _nt ngrams' = pure $ Map.fromList [(Nothing, ngrams')]
flowSocialListByMode listIds nt ngrams' = do
counts <- countFilterList ngrams' nt listIds Map.empty
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment