Safe Haskell | None |
---|---|
Language | Haskell2010 |
Abstractions for looking up (type) variables in structures
- type family VarLookupKey m :: *
- type family VarLookupVal m :: *
- class VarLookup m where
- class LookupApply l1 l2 where
- type MetaLev = Int
- metaLevVal :: MetaLev
- type StackedVarLookup s = Stacks s
Documentation
type family VarLookupKey m :: * Source #
Type family for key of a VarLookup
type VarLookupKey (StackedVarLookup s) Source # | |
type VarLookupKey (VarMp' k v) Source # | |
type family VarLookupVal m :: * Source #
Type family for value of a VarLookup
type VarLookupVal (StackedVarLookup s) Source # | |
type VarLookupVal (VarMp' k v) Source # | |
class VarLookup m where Source #
VarLookup abstracts from a Map. The purpose is to be able to combine maps only for the purpose of searching without actually merging the maps. This then avoids the later need to unmerge such mergings. The class interface serves to hide this.
varlookupWithMetaLev :: MetaLev -> VarLookupKey m -> m -> Maybe (VarLookupVal m) Source #
Lookup a key at a level
varlookup :: VarLookupKey m -> m -> Maybe (VarLookupVal m) Source #
Lookup a key
varlookupKeysSetWithMetaLev :: Ord (VarLookupKey m) => MetaLev -> m -> Set (VarLookupKey m) Source #
Keys at a level
varlookupKeysSet :: Ord (VarLookupKey m) => m -> Set (VarLookupKey m) Source #
Keys as Set
varlookupEmpty :: m Source #
Make an empty VarLookup
varlookupSingletonWithMetaLev :: MetaLev -> VarLookupKey m -> VarLookupVal m -> m Source #
Make a singleton VarLookup at a level
varlookupSingleton :: VarLookupKey m -> VarLookupVal m -> m Source #
Make a singleton VarLookup
class LookupApply l1 l2 where Source #
LookupApply l1 l2 => LookupApply l1 (Stacks l2) Source # | |
Ord k => LookupApply (VarMp' k v) (VarMp' k v) Source # | |
metaLevVal :: MetaLev Source #
Base level (of values, usually)
type StackedVarLookup s = Stacks s Source #
VarLookupCmb abstracts the combining
of/from a substitution.
The interface goes along with VarLookup but is split off to avoid functional dependency restrictions.
The purpose is to be able to combine maps only for the purpose of searching without actually merging the maps.
This then avoids the later need to unmerge such mergings.
Stacked VarLookup derived from a base one, to allow a use of multiple lookups but update on top only