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

[FIX:Warnings]

parent 52e20122
Pipeline #1226 failed with stage
...@@ -42,11 +42,11 @@ toGroupedText groupParams scores = ...@@ -42,11 +42,11 @@ toGroupedText groupParams scores =
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- | WIP
-- toGroupedText_test :: Bool -- Map Stem (GroupedText Int) toGroupedText_test :: Bool -- Map Stem (GroupedText Int)
toGroupedText_test = toGroupedText_test =
-- fromGroupedScores $ fromListScores from -- fromGroupedScores $ fromListScores from
toGroupedText params from datas -- == result toGroupedText params from datas == result
where where
params = GroupedTextParams identity (Set.size . snd) fst snd params = GroupedTextParams identity (Set.size . snd) fst snd
from :: Map Text FlowListScores from :: Map Text FlowListScores
...@@ -88,7 +88,7 @@ toGroupedText_test = ...@@ -88,7 +88,7 @@ toGroupedText_test =
,_gt_children = Set.fromList ["A. Rahmani","B. Tamain"] ,_gt_children = Set.fromList ["A. Rahmani","B. Tamain"]
,_gt_size = 2 ,_gt_size = 2
,_gt_stem = "T. Reposeur" ,_gt_stem = "T. Reposeur"
,_gt_nodes = Set.fromList [3,4] ,_gt_nodes = Set.fromList [1..6]
} }
) )
] ]
......
...@@ -94,14 +94,14 @@ addIfNotExist :: Map Text FlowListScores ...@@ -94,14 +94,14 @@ addIfNotExist :: Map Text FlowListScores
-> Map Text (Set NodeId) -> Map Text (Set NodeId)
-> Map Text (GroupedTextScores (Set NodeId)) -> Map Text (GroupedTextScores (Set NodeId))
addIfNotExist mapSocialScores mapScores = addIfNotExist mapSocialScores mapScores =
foldl' (addIfNotExist' mapSocialScores mapScores) Map.empty $ Map.toList mapScores foldl' (addIfNotExist' mapSocialScores) Map.empty $ Map.toList mapScores
where where
addIfNotExist' mss ms m (t,ns) = addIfNotExist' mss m (t,ns) =
case Map.lookup t mss of case Map.lookup t mss of
Nothing -> Map.alter (add (t,ns)) t m Nothing -> Map.alter (add ns) t m
_ -> 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 add _ _ = Nothing -- should not be present
......
...@@ -89,12 +89,12 @@ flowSocialList' flowPriority user nt ngrams' = ...@@ -89,12 +89,12 @@ flowSocialList' flowPriority user nt ngrams' =
------------------------------------------------------------------------ ------------------------------------------------------------------------
flowSocialListByMode :: ( RepoCmdM env err m flowSocialListByMode :: ( RepoCmdM env err m
, CmdM env err m , CmdM env err m
, HasNodeError err , HasNodeError err
, HasTreeError err , HasTreeError err
) )
=> [NodeId]-> NgramsType -> Set Text => [NodeId]-> NgramsType -> Set Text
-> m (Map (Maybe ListType) (Set Text)) -> m (Map (Maybe ListType) (Set Text))
flowSocialListByMode [] _nt ngrams' = pure $ Map.fromList [(Nothing, ngrams')] flowSocialListByMode [] _nt ngrams' = pure $ Map.fromList [(Nothing, ngrams')]
flowSocialListByMode listIds nt ngrams' = do flowSocialListByMode listIds nt ngrams' = do
counts <- countFilterList ngrams' nt listIds Map.empty 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