Safe Haskell | None |
---|---|
Language | Haskell2010 |
- 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
- 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.
TrieMap CoreMap # | |
Outputable a => Outputable (CoreMap a) # | |
type Key CoreMap # | |
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.
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.
TrieMap LooseTypeMap # | |
type Key LooseTypeMap # | |
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
Maps over List
values
Maps over Literal
s
type LiteralMap a = Map Literal a Source #