ghc-9.10.3: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Cmm.Dataflow.Label

Contents

- Set
- Map

Synopsis

- data Label
- data LabelMap v
- data LabelSet
- type FactBase f = LabelMap f
- lookupFact :: Label -> FactBase f -> Maybe f
- mkHooplLabel :: Word64 -> Label
- setEmpty :: LabelSet
- setNull :: LabelSet -> Bool
- setSize :: LabelSet -> Int
- setMember :: Label -> LabelSet -> Bool
- setSingleton :: Label -> LabelSet
- setInsert :: Label -> LabelSet -> LabelSet
- setDelete :: Label -> LabelSet -> LabelSet
- setUnion :: LabelSet -> LabelSet -> LabelSet
- setUnions :: [LabelSet] -> LabelSet
- setDifference :: LabelSet -> LabelSet -> LabelSet
- setIntersection :: LabelSet -> LabelSet -> LabelSet
- setIsSubsetOf :: LabelSet -> LabelSet -> Bool
- setFilter :: (Label -> Bool) -> LabelSet -> LabelSet
- setFoldl :: (t -> Label -> t) -> t -> LabelSet -> t
- setFoldr :: (Label -> t -> t) -> t -> LabelSet -> t
- setFromList :: [Label] -> LabelSet
- setElems :: LabelSet -> [Label]
- mapNull :: LabelMap a -> Bool
- mapSize :: LabelMap a -> Int
- mapMember :: Label -> LabelMap a -> Bool
- mapLookup :: Label -> LabelMap a -> Maybe a
- mapFindWithDefault :: a -> Label -> LabelMap a -> a
- mapEmpty :: LabelMap v
- mapSingleton :: Label -> v -> LabelMap v
- mapInsert :: Label -> v -> LabelMap v -> LabelMap v
- mapInsertWith :: (v -> v -> v) -> Label -> v -> LabelMap v -> LabelMap v
- mapDelete :: Label -> LabelMap v -> LabelMap v
- mapAlter :: (Maybe v -> Maybe v) -> Label -> LabelMap v -> LabelMap v
- mapAdjust :: (v -> v) -> Label -> LabelMap v -> LabelMap v
- mapUnion :: LabelMap v -> LabelMap v -> LabelMap v
- mapUnions :: [LabelMap a] -> LabelMap a
- mapUnionWithKey :: (Label -> v -> v -> v) -> LabelMap v -> LabelMap v -> LabelMap v
- mapDifference :: LabelMap v -> LabelMap b -> LabelMap v
- mapIntersection :: LabelMap v -> LabelMap b -> LabelMap v
- mapIsSubmapOf :: Eq a => LabelMap a -> LabelMap a -> Bool
- mapMap :: (a -> v) -> LabelMap a -> LabelMap v
- mapMapWithKey :: (Label -> a -> v) -> LabelMap a -> LabelMap v
- mapFoldl :: (a -> b -> a) -> a -> LabelMap b -> a
- mapFoldr :: (a -> b -> b) -> b -> LabelMap a -> b
- mapFoldlWithKey :: (t -> Label -> b -> t) -> t -> LabelMap b -> t
- mapFoldMapWithKey :: Monoid m => (Label -> t -> m) -> LabelMap t -> m
- mapFilter :: (v -> Bool) -> LabelMap v -> LabelMap v
- mapFilterWithKey :: (Label -> v -> Bool) -> LabelMap v -> LabelMap v
- mapElems :: LabelMap a -> [a]
- mapKeys :: LabelMap a -> [Label]
- mapToList :: LabelMap b -> [(Label, b)]
- mapFromList :: [(Label, v)] -> LabelMap v
- mapFromListWith :: (v -> v -> v) -> [(Label, v)] -> LabelMap v

# Documentation

data Label Source #

#### Instances

Instances details

Uniquable Label Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods getUnique :: Label -> Unique Source #
Outputable Label Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods ppr :: Label -> SDoc Source #
Show Label Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods showsPrec :: Int -> Label -> ShowS # show :: Label -> String # showList :: [Label] -> ShowS #
Eq Label Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods (==) :: Label -> Label -> Bool # (/=) :: Label -> Label -> Bool #
Ord Label Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods compare :: Label -> Label -> Ordering # (<) :: Label -> Label -> Bool # (<=) :: Label -> Label -> Bool # (>) :: Label -> Label -> Bool # (>=) :: Label -> Label -> Bool # max :: Label -> Label -> Label # min :: Label -> Label -> Label #
OutputableP env Label Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods pdoc :: env -> Label -> SDoc Source #

data LabelMap v Source #

#### Instances

Instances details

TrieMap LabelMap Source # |

Instance details

Defined in GHC.Cmm.Dataflow.Label

Associated Types

type Key LabelMap |
Instance details Defined in GHC.Cmm.Dataflow.Label type Key LabelMap = Label

Methods

emptyTM :: LabelMap a Source #

lookupTM :: Key LabelMap -> LabelMap b -> Maybe b Source #

alterTM :: Key LabelMap -> XT b -> LabelMap b -> LabelMap b Source #

filterTM :: (a -> Bool) -> LabelMap a -> LabelMap a Source #

foldTM :: (a -> b -> b) -> LabelMap a -> b -> b Source #

Functor LabelMap Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods fmap :: (a -> b) -> LabelMap a -> LabelMap b # (<$) :: a -> LabelMap b -> LabelMap a #
Foldable LabelMap Source # |

Instance details

Defined in GHC.Cmm.Dataflow.Label

Methods

fold :: Monoid m => LabelMap m -> m #

foldMap :: Monoid m => (a -> m) -> LabelMap a -> m #

foldMap' :: Monoid m => (a -> m) -> LabelMap a -> m #

foldr :: (a -> b -> b) -> b -> LabelMap a -> b #

foldr' :: (a -> b -> b) -> b -> LabelMap a -> b #

foldl :: (b -> a -> b) -> b -> LabelMap a -> b #

foldl' :: (b -> a -> b) -> b -> LabelMap a -> b #

foldr1 :: (a -> a -> a) -> LabelMap a -> a #

foldl1 :: (a -> a -> a) -> LabelMap a -> a #

toList :: LabelMap a -> [a] #

null :: LabelMap a -> Bool #

length :: LabelMap a -> Int #

elem :: Eq a => a -> LabelMap a -> Bool #

maximum :: Ord a => LabelMap a -> a #

minimum :: Ord a => LabelMap a -> a #

sum :: Num a => LabelMap a -> a #

product :: Num a => LabelMap a -> a #

Traversable LabelMap Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods traverse :: Applicative f => (a -> f b) -> LabelMap a -> f (LabelMap b) # sequenceA :: Applicative f => LabelMap (f a) -> f (LabelMap a) # mapM :: Monad m => (a -> m b) -> LabelMap a -> m (LabelMap b) # sequence :: Monad m => LabelMap (m a) -> m (LabelMap a) #
OutputableP env a => OutputableP env (LabelMap a) Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods pdoc :: env -> LabelMap a -> SDoc Source #
Outputable a => Outputable (LabelMap a) Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods ppr :: LabelMap a -> SDoc Source #
Show v => Show (LabelMap v) Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods showsPrec :: Int -> LabelMap v -> ShowS # show :: LabelMap v -> String # showList :: [LabelMap v] -> ShowS #
Eq v => Eq (LabelMap v) Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods (==) :: LabelMap v -> LabelMap v -> Bool # (/=) :: LabelMap v -> LabelMap v -> Bool #
Ord v => Ord (LabelMap v) Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods compare :: LabelMap v -> LabelMap v -> Ordering # (<) :: LabelMap v -> LabelMap v -> Bool # (<=) :: LabelMap v -> LabelMap v -> Bool # (>) :: LabelMap v -> LabelMap v -> Bool # (>=) :: LabelMap v -> LabelMap v -> Bool # max :: LabelMap v -> LabelMap v -> LabelMap v # min :: LabelMap v -> LabelMap v -> LabelMap v #
type Key LabelMap Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label type Key LabelMap = Label

data LabelSet Source #

#### Instances

Instances details

Outputable LabelSet Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods ppr :: LabelSet -> SDoc Source #
Monoid LabelSet Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods mempty :: LabelSet # mappend :: LabelSet -> LabelSet -> LabelSet # mconcat :: [LabelSet] -> LabelSet #
Semigroup LabelSet Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods (<>) :: LabelSet -> LabelSet -> LabelSet # sconcat :: NonEmpty LabelSet -> LabelSet # stimes :: Integral b => b -> LabelSet -> LabelSet #
Show LabelSet Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods showsPrec :: Int -> LabelSet -> ShowS # show :: LabelSet -> String # showList :: [LabelSet] -> ShowS #
Eq LabelSet Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods (==) :: LabelSet -> LabelSet -> Bool # (/=) :: LabelSet -> LabelSet -> Bool #
Ord LabelSet Source # |
Instance details Defined in GHC.Cmm.Dataflow.Label Methods compare :: LabelSet -> LabelSet -> Ordering # (<) :: LabelSet -> LabelSet -> Bool # (<=) :: LabelSet -> LabelSet -> Bool # (>) :: LabelSet -> LabelSet -> Bool # (>=) :: LabelSet -> LabelSet -> Bool # max :: LabelSet -> LabelSet -> LabelSet # min :: LabelSet -> LabelSet -> LabelSet #

type FactBase f = LabelMap f Source #

lookupFact :: Label -> FactBase f -> Maybe f Source #

mkHooplLabel :: Word64 -> Label Source #

# Set

setEmpty :: LabelSet Source #

setNull :: LabelSet -> Bool Source #

setSize :: LabelSet -> Int Source #

setMember :: Label -> LabelSet -> Bool Source #

setSingleton :: Label -> LabelSet Source #

setInsert :: Label -> LabelSet -> LabelSet Source #

setDelete :: Label -> LabelSet -> LabelSet Source #

setUnion :: LabelSet -> LabelSet -> LabelSet Source #

setUnions :: [LabelSet] -> LabelSet Source #

setDifference :: LabelSet -> LabelSet -> LabelSet Source #

setIntersection :: LabelSet -> LabelSet -> LabelSet Source #

setIsSubsetOf :: LabelSet -> LabelSet -> Bool Source #

setFilter :: (Label -> Bool) -> LabelSet -> LabelSet Source #

setFoldl :: (t -> Label -> t) -> t -> LabelSet -> t Source #

setFoldr :: (Label -> t -> t) -> t -> LabelSet -> t Source #

setFromList :: [Label] -> LabelSet Source #

setElems :: LabelSet -> [Label] Source #

# Map

mapNull :: LabelMap a -> Bool Source #

mapSize :: LabelMap a -> Int Source #

mapMember :: Label -> LabelMap a -> Bool Source #

mapLookup :: Label -> LabelMap a -> Maybe a Source #

mapFindWithDefault :: a -> Label -> LabelMap a -> a Source #

mapEmpty :: LabelMap v Source #

mapSingleton :: Label -> v -> LabelMap v Source #

mapInsert :: Label -> v -> LabelMap v -> LabelMap v Source #

mapInsertWith :: (v -> v -> v) -> Label -> v -> LabelMap v -> LabelMap v Source #

mapDelete :: Label -> LabelMap v -> LabelMap v Source #

mapAlter :: (Maybe v -> Maybe v) -> Label -> LabelMap v -> LabelMap v Source #

mapAdjust :: (v -> v) -> Label -> LabelMap v -> LabelMap v Source #

mapUnion :: LabelMap v -> LabelMap v -> LabelMap v Source #

mapUnions :: [LabelMap a] -> LabelMap a Source #

mapUnionWithKey :: (Label -> v -> v -> v) -> LabelMap v -> LabelMap v -> LabelMap v Source #

mapDifference :: LabelMap v -> LabelMap b -> LabelMap v Source #

mapIntersection :: LabelMap v -> LabelMap b -> LabelMap v Source #

mapIsSubmapOf :: Eq a => LabelMap a -> LabelMap a -> Bool Source #

mapMap :: (a -> v) -> LabelMap a -> LabelMap v Source #

mapMapWithKey :: (Label -> a -> v) -> LabelMap a -> LabelMap v Source #

mapFoldl :: (a -> b -> a) -> a -> LabelMap b -> a Source #

mapFoldr :: (a -> b -> b) -> b -> LabelMap a -> b Source #

mapFoldlWithKey :: (t -> Label -> b -> t) -> t -> LabelMap b -> t Source #

mapFoldMapWithKey :: Monoid m => (Label -> t -> m) -> LabelMap t -> m Source #

mapFilter :: (v -> Bool) -> LabelMap v -> LabelMap v Source #

mapFilterWithKey :: (Label -> v -> Bool) -> LabelMap v -> LabelMap v Source #

mapElems :: LabelMap a -> [a] Source #

mapKeys :: LabelMap a -> [Label] Source #

mapToList :: LabelMap b -> [(Label, b)] Source #

mapFromList :: [(Label, v)] -> LabelMap v Source #

mapFromListWith :: (v -> v -> v) -> [(Label, v)] -> LabelMap v Source #