Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data CoreMap a
- emptyCoreMap :: CoreMap a
- extendCoreMap :: CoreMap a -> CoreExpr -> a -> CoreMap a
- lookupCoreMap :: CoreMap a -> CoreExpr -> Maybe a
- foldCoreMap :: (a -> b -> b) -> b -> CoreMap a -> b
- data TypeMap a
- emptyTypeMap :: TypeMap a
- extendTypeMap :: TypeMap a -> Type -> a -> TypeMap a
- lookupTypeMap :: TypeMap a -> Type -> Maybe a
- foldTypeMap :: (a -> b -> b) -> b -> TypeMap a -> b
- data LooseTypeMap a
- data CmEnv
- lookupCME :: CmEnv -> Var -> Maybe BoundVar
- extendTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> a -> TypeMap a
- lookupTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> Maybe a
- mkDeBruijnContext :: [Var] -> CmEnv
- data MaybeMap m a
- data ListMap m a
- type LiteralMap a = Map Literal a
- data GenMap m a
- class TrieMap m where
- insertTM :: TrieMap m => Key m -> a -> m a -> m a
- deleteTM :: TrieMap m => Key m -> m a -> m a
- lkDFreeVar :: Var -> DVarEnv a -> Maybe a
- xtDFreeVar :: Var -> XT a -> DVarEnv a -> DVarEnv a
- lkDNamed :: NamedThing n => n -> DNameEnv a -> Maybe a
- xtDNamed :: NamedThing n => n -> XT a -> DNameEnv a -> DNameEnv a
- (>.>) :: (a -> b) -> (b -> c) -> a -> c
- (|>) :: a -> (a -> b) -> b
- (|>>) :: TrieMap m2 => (XT (m2 a) -> m1 (m2 a) -> m1 (m2 a)) -> (m2 a -> m2 a) -> m1 (m2 a) -> m1 (m2 a)
Maps over Core expressions
CoreMap a
is a map from CoreExpr
to a
. If you are a client, this
is the type you want.
Instances
TrieMap CoreMap # | |
Defined in GHC.Core.Map | |
Outputable a => Outputable (CoreMap a) # | |
type Key CoreMap # | |
Defined in GHC.Core.Map |
emptyCoreMap :: CoreMap a Source #
foldCoreMap :: (a -> b -> b) -> b -> CoreMap a -> b Source #
Maps over Type
s
TypeMap a
is a map from Type
to a
. If you are a client, this
is the type you want. The keys in this map may have different kinds.
Instances
TrieMap TypeMap # | |
Defined in GHC.Core.Map | |
type Key TypeMap # | |
Defined in GHC.Core.Map |
emptyTypeMap :: TypeMap a Source #
foldTypeMap :: (a -> b -> b) -> b -> TypeMap a -> b Source #
data LooseTypeMap a Source #
A LooseTypeMap
doesn't do a kind-check. Thus, when lookup up (t |> g),
you'll find entries inserted under (t), even if (g) is non-reflexive.
Instances
TrieMap LooseTypeMap # | |
Defined in GHC.Core.Map type Key LooseTypeMap Source # emptyTM :: LooseTypeMap a Source # lookupTM :: Key LooseTypeMap -> LooseTypeMap b -> Maybe b Source # alterTM :: Key LooseTypeMap -> XT b -> LooseTypeMap b -> LooseTypeMap b Source # mapTM :: (a -> b) -> LooseTypeMap a -> LooseTypeMap b Source # foldTM :: (a -> b -> b) -> LooseTypeMap a -> b -> b Source # | |
type Key LooseTypeMap # | |
Defined in GHC.Core.Map |
With explicit scoping
extendTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> a -> TypeMap a Source #
Extend a TypeMap
with a type in the given context.
extendTypeMapWithScope m (mkDeBruijnContext [a,b,c]) t v
is equivalent to
extendTypeMap m (forall a b c. t) v
, but allows reuse of the context over
multiple insertions.
mkDeBruijnContext :: [Var] -> CmEnv Source #
Construct a deBruijn environment with the given variables in scope.
e.g. mkDeBruijnEnv [a,b,c]
constructs a context forall a b c.
Maps over Maybe
values
Instances
TrieMap m => TrieMap (MaybeMap m) # | |
Defined in GHC.Data.TrieMap | |
type Key (MaybeMap m) # | |
Defined in GHC.Data.TrieMap |
Maps over List
values
Instances
TrieMap m => TrieMap (ListMap m) # | |
Defined in GHC.Data.TrieMap | |
(TrieMap m, Outputable a) => Outputable (ListMap m a) # | |
type Key (ListMap m) # | |
Defined in GHC.Data.TrieMap |
Maps over Literal
s
type LiteralMap a = Map Literal a Source #
Map for compressing leaves. See Note [Compressed TrieMap]
Instances
(Eq (Key m), TrieMap m) => TrieMap (GenMap m) # | |
Defined in GHC.Data.TrieMap | |
(Outputable a, Outputable (m a)) => Outputable (GenMap m a) # | |
type Key (GenMap m) # | |
Defined in GHC.Data.TrieMap |
TrieMap
class
class TrieMap m where Source #
lookupTM :: forall b. Key m -> m b -> Maybe b Source #
alterTM :: forall b. Key m -> XT b -> m b -> m b Source #
Instances
TrieMap IntMap # | |
Defined in GHC.Data.TrieMap | |
TrieMap LabelMap # | |
Defined in GHC.Cmm.Dataflow.Label | |
TrieMap LooseTypeMap # | |
Defined in GHC.Core.Map type Key LooseTypeMap Source # emptyTM :: LooseTypeMap a Source # lookupTM :: Key LooseTypeMap -> LooseTypeMap b -> Maybe b Source # alterTM :: Key LooseTypeMap -> XT b -> LooseTypeMap b -> LooseTypeMap b Source # mapTM :: (a -> b) -> LooseTypeMap a -> LooseTypeMap b Source # foldTM :: (a -> b -> b) -> LooseTypeMap a -> b -> b Source # | |
TrieMap TypeMap # | |
Defined in GHC.Core.Map | |
TrieMap CoreMap # | |
Defined in GHC.Core.Map | |
Ord k => TrieMap (Map k) # | |
Uniquable key => TrieMap (UniqDFM key) # | |
Defined in GHC.Data.TrieMap | |
(Eq (Key m), TrieMap m) => TrieMap (GenMap m) # | |
Defined in GHC.Data.TrieMap | |
TrieMap m => TrieMap (ListMap m) # | |
Defined in GHC.Data.TrieMap | |
TrieMap m => TrieMap (MaybeMap m) # | |
Defined in GHC.Data.TrieMap |