Hoopl.Collections

ghc-8.6.3: The GHC API

Safe Haskell | None
Language | Haskell2010

Hoopl.Collections

# Documentation

class IsSet set where #

Associated Types

type ElemOf set #

Methods

setNull :: set -> Bool #

setSize :: set -> Int #

setMember :: ElemOf set -> set -> Bool #

setEmpty :: set #

setSingleton :: ElemOf set -> set #

setInsert :: ElemOf set -> set -> set #

setDelete :: ElemOf set -> set -> set #

setUnion :: set -> set -> set #

setDifference :: set -> set -> set #

setIntersection :: set -> set -> set #

setIsSubsetOf :: set -> set -> Bool #

setFoldl :: (b -> ElemOf set -> b) -> b -> set -> b #

setFoldr :: (ElemOf set -> b -> b) -> b -> set -> b #

setElems :: set -> [ElemOf set] #

setFromList :: [ElemOf set] -> set #

Instances

IsSet UniqueSet # |
Instance details Defined in Hoopl.Collections Associated Types type ElemOf UniqueSet :: Type # Methods setNull :: UniqueSet -> Bool # setSize :: UniqueSet -> Int # setMember :: ElemOf UniqueSet -> UniqueSet -> Bool # setEmpty :: UniqueSet # setSingleton :: ElemOf UniqueSet -> UniqueSet # setInsert :: ElemOf UniqueSet -> UniqueSet -> UniqueSet # setDelete :: ElemOf UniqueSet -> UniqueSet -> UniqueSet # setUnion :: UniqueSet -> UniqueSet -> UniqueSet # setDifference :: UniqueSet -> UniqueSet -> UniqueSet # setIntersection :: UniqueSet -> UniqueSet -> UniqueSet # setIsSubsetOf :: UniqueSet -> UniqueSet -> Bool # setFoldl :: (b -> ElemOf UniqueSet -> b) -> b -> UniqueSet -> b # setFoldr :: (ElemOf UniqueSet -> b -> b) -> b -> UniqueSet -> b # setElems :: UniqueSet -> [ElemOf UniqueSet] # setFromList :: [ElemOf UniqueSet] -> UniqueSet #
IsSet LabelSet # |
Instance details Defined in Hoopl.Label Associated Types type ElemOf LabelSet :: Type # Methods setNull :: LabelSet -> Bool # setSize :: LabelSet -> Int # setMember :: ElemOf LabelSet -> LabelSet -> Bool # setEmpty :: LabelSet # setSingleton :: ElemOf LabelSet -> LabelSet # setInsert :: ElemOf LabelSet -> LabelSet -> LabelSet # setDelete :: ElemOf LabelSet -> LabelSet -> LabelSet # setUnion :: LabelSet -> LabelSet -> LabelSet # setDifference :: LabelSet -> LabelSet -> LabelSet # setIntersection :: LabelSet -> LabelSet -> LabelSet # setIsSubsetOf :: LabelSet -> LabelSet -> Bool # setFoldl :: (b -> ElemOf LabelSet -> b) -> b -> LabelSet -> b # setFoldr :: (ElemOf LabelSet -> b -> b) -> b -> LabelSet -> b # setElems :: LabelSet -> [ElemOf LabelSet] # setFromList :: [ElemOf LabelSet] -> LabelSet #

setInsertList :: IsSet set => [ElemOf set] -> set -> set #

setDeleteList :: IsSet set => [ElemOf set] -> set -> set #

setUnions :: IsSet set => [set] -> set #

class IsMap map where #

Associated Types

type KeyOf map #

Methods

mapNull :: map a -> Bool #

mapSize :: map a -> Int #

mapMember :: KeyOf map -> map a -> Bool #

mapLookup :: KeyOf map -> map a -> Maybe a #

mapFindWithDefault :: a -> KeyOf map -> map a -> a #

mapEmpty :: map a #

mapSingleton :: KeyOf map -> a -> map a #

mapInsert :: KeyOf map -> a -> map a -> map a #

mapInsertWith :: (a -> a -> a) -> KeyOf map -> a -> map a -> map a #

mapDelete :: KeyOf map -> map a -> map a #

mapAlter :: (Maybe a -> Maybe a) -> KeyOf map -> map a -> map a #

mapUnion :: map a -> map a -> map a #

mapUnionWithKey :: (KeyOf map -> a -> a -> a) -> map a -> map a -> map a #

mapDifference :: map a -> map a -> map a #

mapIntersection :: map a -> map a -> map a #

mapIsSubmapOf :: Eq a => map a -> map a -> Bool #

mapMap :: (a -> b) -> map a -> map b #

mapMapWithKey :: (KeyOf map -> a -> b) -> map a -> map b #

mapFoldl :: (b -> a -> b) -> b -> map a -> b #

mapFoldr :: (a -> b -> b) -> b -> map a -> b #

mapFoldlWithKey :: (b -> KeyOf map -> a -> b) -> b -> map a -> b #

mapFilter :: (a -> Bool) -> map a -> map a #

mapElems :: map a -> [a] #

mapKeys :: map a -> [KeyOf map] #

mapToList :: map a -> [(KeyOf map, a)] #

mapFromList :: [(KeyOf map, a)] -> map a #

mapFromListWith :: (a -> a -> a) -> [(KeyOf map, a)] -> map a #

Instances

IsMap UniqueMap # |
Instance details Defined in Hoopl.Collections Associated Types type KeyOf UniqueMap :: Type # Methods mapNull :: UniqueMap a -> Bool # mapSize :: UniqueMap a -> Int # mapMember :: KeyOf UniqueMap -> UniqueMap a -> Bool # mapLookup :: KeyOf UniqueMap -> UniqueMap a -> Maybe a # mapFindWithDefault :: a -> KeyOf UniqueMap -> UniqueMap a -> a # mapEmpty :: UniqueMap a # mapSingleton :: KeyOf UniqueMap -> a -> UniqueMap a # mapInsert :: KeyOf UniqueMap -> a -> UniqueMap a -> UniqueMap a # mapInsertWith :: (a -> a -> a) -> KeyOf UniqueMap -> a -> UniqueMap a -> UniqueMap a # mapDelete :: KeyOf UniqueMap -> UniqueMap a -> UniqueMap a # mapAlter :: (Maybe a -> Maybe a) -> KeyOf UniqueMap -> UniqueMap a -> UniqueMap a # mapUnion :: UniqueMap a -> UniqueMap a -> UniqueMap a # mapUnionWithKey :: (KeyOf UniqueMap -> a -> a -> a) -> UniqueMap a -> UniqueMap a -> UniqueMap a # mapDifference :: UniqueMap a -> UniqueMap a -> UniqueMap a # mapIntersection :: UniqueMap a -> UniqueMap a -> UniqueMap a # mapIsSubmapOf :: Eq a => UniqueMap a -> UniqueMap a -> Bool # mapMap :: (a -> b) -> UniqueMap a -> UniqueMap b # mapMapWithKey :: (KeyOf UniqueMap -> a -> b) -> UniqueMap a -> UniqueMap b # mapFoldl :: (b -> a -> b) -> b -> UniqueMap a -> b # mapFoldr :: (a -> b -> b) -> b -> UniqueMap a -> b # mapFoldlWithKey :: (b -> KeyOf UniqueMap -> a -> b) -> b -> UniqueMap a -> b # mapFilter :: (a -> Bool) -> UniqueMap a -> UniqueMap a # mapElems :: UniqueMap a -> [a] # mapKeys :: UniqueMap a -> [KeyOf UniqueMap] # mapToList :: UniqueMap a -> [(KeyOf UniqueMap, a)] # mapFromList :: [(KeyOf UniqueMap, a)] -> UniqueMap a # mapFromListWith :: (a -> a -> a) -> [(KeyOf UniqueMap, a)] -> UniqueMap a #
IsMap LabelMap # |
Instance details Defined in Hoopl.Label Associated Types type KeyOf LabelMap :: Type # Methods mapNull :: LabelMap a -> Bool # mapSize :: LabelMap a -> Int # mapMember :: KeyOf LabelMap -> LabelMap a -> Bool # mapLookup :: KeyOf LabelMap -> LabelMap a -> Maybe a # mapFindWithDefault :: a -> KeyOf LabelMap -> LabelMap a -> a # mapEmpty :: LabelMap a # mapSingleton :: KeyOf LabelMap -> a -> LabelMap a # mapInsert :: KeyOf LabelMap -> a -> LabelMap a -> LabelMap a # mapInsertWith :: (a -> a -> a) -> KeyOf LabelMap -> a -> LabelMap a -> LabelMap a # mapDelete :: KeyOf LabelMap -> LabelMap a -> LabelMap a # mapAlter :: (Maybe a -> Maybe a) -> KeyOf LabelMap -> LabelMap a -> LabelMap a # mapUnion :: LabelMap a -> LabelMap a -> LabelMap a # mapUnionWithKey :: (KeyOf LabelMap -> a -> a -> a) -> LabelMap a -> LabelMap a -> LabelMap a # mapDifference :: LabelMap a -> LabelMap a -> LabelMap a # mapIntersection :: LabelMap a -> LabelMap a -> LabelMap a # mapIsSubmapOf :: Eq a => LabelMap a -> LabelMap a -> Bool # mapMap :: (a -> b) -> LabelMap a -> LabelMap b # mapMapWithKey :: (KeyOf LabelMap -> a -> b) -> LabelMap a -> LabelMap b # mapFoldl :: (b -> a -> b) -> b -> LabelMap a -> b # mapFoldr :: (a -> b -> b) -> b -> LabelMap a -> b # mapFoldlWithKey :: (b -> KeyOf LabelMap -> a -> b) -> b -> LabelMap a -> b # mapFilter :: (a -> Bool) -> LabelMap a -> LabelMap a # mapElems :: LabelMap a -> [a] # mapKeys :: LabelMap a -> [KeyOf LabelMap] # mapToList :: LabelMap a -> [(KeyOf LabelMap, a)] # mapFromList :: [(KeyOf LabelMap, a)] -> LabelMap a # mapFromListWith :: (a -> a -> a) -> [(KeyOf LabelMap, a)] -> LabelMap a #

mapInsertList :: IsMap map => [(KeyOf map, a)] -> map a -> map a #

mapDeleteList :: IsMap map => [KeyOf map] -> map a -> map a #

mapUnions :: IsMap map => [map a] -> map a #

data UniqueMap v #

Instances

Functor UniqueMap # |
Instance details Defined in Hoopl.Collections Methods fmap :: (a -> b) -> UniqueMap a -> UniqueMap b Source # (<$) :: a -> UniqueMap b -> UniqueMap a Source #
Foldable UniqueMap # |
Instance details Defined in Hoopl.Collections Methods fold :: Monoid m => UniqueMap m -> m Source # foldMap :: Monoid m => (a -> m) -> UniqueMap a -> m Source # foldr :: (a -> b -> b) -> b -> UniqueMap a -> b Source # foldr' :: (a -> b -> b) -> b -> UniqueMap a -> b Source # foldl :: (b -> a -> b) -> b -> UniqueMap a -> b Source # foldl' :: (b -> a -> b) -> b -> UniqueMap a -> b Source # foldr1 :: (a -> a -> a) -> UniqueMap a -> a Source # foldl1 :: (a -> a -> a) -> UniqueMap a -> a Source # toList :: UniqueMap a -> [a] Source # null :: UniqueMap a -> Bool Source # length :: UniqueMap a -> Int Source # elem :: Eq a => a -> UniqueMap a -> Bool Source # maximum :: Ord a => UniqueMap a -> a Source # minimum :: Ord a => UniqueMap a -> a Source # sum :: Num a => UniqueMap a -> a Source # product :: Num a => UniqueMap a -> a Source #
Traversable UniqueMap # |
Instance details Defined in Hoopl.Collections Methods traverse :: Applicative f => (a -> f b) -> UniqueMap a -> f (UniqueMap b) Source # sequenceA :: Applicative f => UniqueMap (f a) -> f (UniqueMap a) Source # mapM :: Monad m => (a -> m b) -> UniqueMap a -> m (UniqueMap b) Source # sequence :: Monad m => UniqueMap (m a) -> m (UniqueMap a) Source #
IsMap UniqueMap # |
Instance details Defined in Hoopl.Collections Associated Types type KeyOf UniqueMap :: Type # Methods mapNull :: UniqueMap a -> Bool # mapSize :: UniqueMap a -> Int # mapMember :: KeyOf UniqueMap -> UniqueMap a -> Bool # mapLookup :: KeyOf UniqueMap -> UniqueMap a -> Maybe a # mapFindWithDefault :: a -> KeyOf UniqueMap -> UniqueMap a -> a # mapEmpty :: UniqueMap a # mapSingleton :: KeyOf UniqueMap -> a -> UniqueMap a # mapInsert :: KeyOf UniqueMap -> a -> UniqueMap a -> UniqueMap a # mapInsertWith :: (a -> a -> a) -> KeyOf UniqueMap -> a -> UniqueMap a -> UniqueMap a # mapDelete :: KeyOf UniqueMap -> UniqueMap a -> UniqueMap a # mapAlter :: (Maybe a -> Maybe a) -> KeyOf UniqueMap -> UniqueMap a -> UniqueMap a # mapUnion :: UniqueMap a -> UniqueMap a -> UniqueMap a # mapUnionWithKey :: (KeyOf UniqueMap -> a -> a -> a) -> UniqueMap a -> UniqueMap a -> UniqueMap a # mapDifference :: UniqueMap a -> UniqueMap a -> UniqueMap a # mapIntersection :: UniqueMap a -> UniqueMap a -> UniqueMap a # mapIsSubmapOf :: Eq a => UniqueMap a -> UniqueMap a -> Bool # mapMap :: (a -> b) -> UniqueMap a -> UniqueMap b # mapMapWithKey :: (KeyOf UniqueMap -> a -> b) -> UniqueMap a -> UniqueMap b # mapFoldl :: (b -> a -> b) -> b -> UniqueMap a -> b # mapFoldr :: (a -> b -> b) -> b -> UniqueMap a -> b # mapFoldlWithKey :: (b -> KeyOf UniqueMap -> a -> b) -> b -> UniqueMap a -> b # mapFilter :: (a -> Bool) -> UniqueMap a -> UniqueMap a # mapElems :: UniqueMap a -> [a] # mapKeys :: UniqueMap a -> [KeyOf UniqueMap] # mapToList :: UniqueMap a -> [(KeyOf UniqueMap, a)] # mapFromList :: [(KeyOf UniqueMap, a)] -> UniqueMap a # mapFromListWith :: (a -> a -> a) -> [(KeyOf UniqueMap, a)] -> UniqueMap a #
Eq v => Eq (UniqueMap v) # |
Instance details Defined in Hoopl.Collections Methods (==) :: UniqueMap v -> UniqueMap v -> Bool # (/=) :: UniqueMap v -> UniqueMap v -> Bool #
Ord v => Ord (UniqueMap v) # |
Instance details Defined in Hoopl.Collections Methods compare :: UniqueMap v -> UniqueMap v -> Ordering # (<) :: UniqueMap v -> UniqueMap v -> Bool # (<=) :: UniqueMap v -> UniqueMap v -> Bool # (>) :: UniqueMap v -> UniqueMap v -> Bool # (>=) :: UniqueMap v -> UniqueMap v -> Bool # max :: UniqueMap v -> UniqueMap v -> UniqueMap v # min :: UniqueMap v -> UniqueMap v -> UniqueMap v #
Show v => Show (UniqueMap v) # |
Instance details Defined in Hoopl.Collections Methods showsPrec :: Int -> UniqueMap v -> ShowS Source # show :: UniqueMap v -> String Source # showList :: [UniqueMap v] -> ShowS Source #
type KeyOf UniqueMap # |
Instance details Defined in Hoopl.Collections type KeyOf UniqueMap = Int

data UniqueSet #

Instances

Eq UniqueSet # |
Instance details Defined in Hoopl.Collections Methods (==) :: UniqueSet -> UniqueSet -> Bool # (/=) :: UniqueSet -> UniqueSet -> Bool #
Ord UniqueSet # |
Instance details Defined in Hoopl.Collections Methods compare :: UniqueSet -> UniqueSet -> Ordering # (<) :: UniqueSet -> UniqueSet -> Bool # (<=) :: UniqueSet -> UniqueSet -> Bool # (>) :: UniqueSet -> UniqueSet -> Bool # (>=) :: UniqueSet -> UniqueSet -> Bool # max :: UniqueSet -> UniqueSet -> UniqueSet # min :: UniqueSet -> UniqueSet -> UniqueSet #
Show UniqueSet # |
Instance details Defined in Hoopl.Collections Methods showsPrec :: Int -> UniqueSet -> ShowS Source # show :: UniqueSet -> String Source # showList :: [UniqueSet] -> ShowS Source #
IsSet UniqueSet # |
Instance details Defined in Hoopl.Collections Associated Types type ElemOf UniqueSet :: Type # Methods setNull :: UniqueSet -> Bool # setSize :: UniqueSet -> Int # setMember :: ElemOf UniqueSet -> UniqueSet -> Bool # setEmpty :: UniqueSet # setSingleton :: ElemOf UniqueSet -> UniqueSet # setInsert :: ElemOf UniqueSet -> UniqueSet -> UniqueSet # setDelete :: ElemOf UniqueSet -> UniqueSet -> UniqueSet # setUnion :: UniqueSet -> UniqueSet -> UniqueSet # setDifference :: UniqueSet -> UniqueSet -> UniqueSet # setIntersection :: UniqueSet -> UniqueSet -> UniqueSet # setIsSubsetOf :: UniqueSet -> UniqueSet -> Bool # setFoldl :: (b -> ElemOf UniqueSet -> b) -> b -> UniqueSet -> b # setFoldr :: (ElemOf UniqueSet -> b -> b) -> b -> UniqueSet -> b # setElems :: UniqueSet -> [ElemOf UniqueSet] # setFromList :: [ElemOf UniqueSet] -> UniqueSet #
type ElemOf UniqueSet # |
Instance details Defined in Hoopl.Collections type ElemOf UniqueSet = Int