Safe Haskell | Safe-Inferred |
---|
Collecting sets of variables and constructors.
- freeT :: (BindStruct c, Ord n) => Env n -> c n -> Set (Bound n)
- freeVarsT :: Ord n => KindEnv n -> Type n -> Set (Bound n)
- class FreeVarConT c where
- collectBound :: (BindStruct c, Ord n) => c n -> Set (Bound n)
- collectBinds :: (BindStruct c, Ord n) => c n -> ([Bind n], [Bind n])
- data BindTree n
- data BindWay
- = BindForall
- | BindLAM
- | BindLam
- | BindLet
- | BindLetRec
- | BindLetRegions
- | BindLetRegionWith
- | BindCasePat
- class BindStruct c where
- slurpBindTree :: c n -> [BindTree n]
- data BoundLevel
- isBoundExpWit :: BoundLevel -> Bool
- boundLevelOfBindWay :: BindWay -> BoundLevel
- bindDefT :: BindStruct c => BindWay -> [Bind n] -> [c n] -> BindTree n
Documentation
freeT :: (BindStruct c, Ord n) => Env n -> c n -> Set (Bound n)Source
Collect the free Spec variables in a thing (level-1).
freeVarsT :: Ord n => KindEnv n -> Type n -> Set (Bound n)Source
Collect the free type variables in a type.
class FreeVarConT c whereSource
collectBound :: (BindStruct c, Ord n) => c n -> Set (Bound n)Source
Collect all the bound variables in a thing, independent of whether they are free or not.
collectBinds :: (BindStruct c, Ord n) => c n -> ([Bind n], [Bind n])Source
Collect all the spec and exp binders in a thing.
A description of the binding structure of some type or expression.
Describes how a variable was bound.
class BindStruct c whereSource
slurpBindTree :: c n -> [BindTree n]Source
BindStruct TyCon | |
BindStruct Type | |
BindStruct (Cast a) | |
BindStruct (Witness a) | |
BindStruct (Alt a) | |
BindStruct (Exp a) | |
BindStruct (Witness a) | |
BindStruct (Cast a) | |
BindStruct (Alt a) | |
BindStruct (Exp a) | |
BindStruct (Module a) |
data BoundLevel Source
What level this binder is at.
isBoundExpWit :: BoundLevel -> BoolSource
Check if a boundlevel is expression or witness
boundLevelOfBindWay :: BindWay -> BoundLevelSource
Get the BoundLevel
corresponding to a BindWay
.