Commit 47e7a53a authored by Alexandre Delanoë's avatar Alexandre Delanoë

[SocialList] fun for grouped texts

parent 0c08de8f
Pipeline #1151 failed with stage
......@@ -16,11 +16,24 @@ module Gargantext.Core.Text.Types
import Control.Lens (makeLenses)
import Data.Set (Set)
import Data.Map (Map)
import Data.Text (Text)
import Gargantext.Core (Lang(..))
import Gargantext.Core.Types (ListType(..))
import Gargantext.Database.Admin.Types.Node (NodeId)
import Gargantext.Prelude
import qualified Data.Set as Set
import qualified Data.Map as Map
import qualified Data.List as List
------------------------------------------------------------------------------
hasListType :: Map Text ListType -> GroupedText a -> Maybe ListType
hasListType m (GroupedText _ label _ g _ _ _) =
List.foldl' (<>) Nothing
$ map (\t -> Map.lookup t m)
$ Set.toList
$ Set.insert label g
------------------------------------------------------------------------------
type Group = Lang -> Int -> Int -> Text -> Text
......
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