Safe Haskell | None |
---|---|
Language | Haskell98 |
Source Tetra primitive type and kind environments.
- data Env = Env {}
- data Presence a
- takePresent :: Presence a -> Maybe a
- empty :: Env
- union :: Env -> Env -> Env
- unions :: [Env] -> Env
- singletonTyVar :: Bind -> Type -> Env
- singletonTyVar' :: Bind -> Env
- extendTyVar :: Bind -> Type -> Env -> Env
- extendTyVar' :: Bind -> Env -> Env
- extendsTyVar' :: [Bind] -> Env -> Env
- lookupTyVar :: Env -> Bound -> Presence Type
- tyStackDepth :: Env -> Int
- singletonDaCon :: DaConBind -> Type -> Env
- extendDaCon :: DaConBind -> Type -> Env -> Env
- lookupDaCon :: DaConBound -> Env -> Maybe Type
- singletonDaVar :: Bind -> Type -> Env
- singletonDaVar' :: Bind -> Env
- extendDaVar :: Bind -> Type -> Env -> Env
- extendsDaVar :: [(Bind, Type)] -> Env -> Env
- extendDaVar' :: Bind -> Env -> Env
- extendDaVarMT :: BindVarMT -> Env -> Env
- extendsDaVarMT :: [BindVarMT] -> Env -> Env
- lookupDaVar :: Env -> Bound -> Presence Type
- daStackDepth :: Env -> Int
- kindOfPrimType :: PrimType -> Maybe Type
- typeOfPrimVal :: PrimVal -> Type
- typeOfPrimLit :: PrimLit -> Type
Documentation
Env | |
|
Presence of a variable in the environment.
Type Variables
singletonTyVar :: Bind -> Type -> Env Source #
Yield an environment containing the kind for a single type variable.
singletonTyVar' :: Bind -> Env Source #
Yield an environment containing a single type variable.
extendTyVar :: Bind -> Type -> Env -> Env Source #
Extend the environment with the kind for a type variable.
extendTyVar' :: Bind -> Env -> Env Source #
Extend the environment with a type variable where we don't know its kind.
extendsTyVar' :: [Bind] -> Env -> Env Source #
Extend the environment with some type variables where we don't know their kinds.
tyStackDepth :: Env -> Int Source #
Get the depth of the type stack.
Data Constructors
singletonDaCon :: DaConBind -> Type -> Env Source #
Yield an environment containing the type of a single data constructor.
extendDaCon :: DaConBind -> Type -> Env -> Env Source #
Extend the environment with the type of a data constructor.
lookupDaCon :: DaConBound -> Env -> Maybe Type Source #
Lookup the type of a data constructor.
Term Variables
singletonDaVar :: Bind -> Type -> Env Source #
Yield an environment containing the type for a single term variable.
singletonDaVar' :: Bind -> Env Source #
Yield an environment containing a single term variable where we don't know its type.
extendDaVar :: Bind -> Type -> Env -> Env Source #
Extend the environment with the type of a term variable.
extendsDaVar :: [(Bind, Type)] -> Env -> Env Source #
Extend the environment with the types of some term variables.
extendDaVar' :: Bind -> Env -> Env Source #
Extend the environment with a term variable where we don't know it's type.
extendDaVarMT :: BindVarMT -> Env -> Env Source #
Like extendDaVar
but take a BindVarMT
extendsDaVarMT :: [BindVarMT] -> Env -> Env Source #
Like extendDaVarMT
but take a list of BindVarMT
daStackDepth :: Env -> Int Source #
Get the depth of the type stack.
Primitive Kinds and Types.
typeOfPrimVal :: PrimVal -> Type Source #
Take the type of a primitive name.
typeOfPrimLit :: PrimLit -> Type Source #
Take the type of a primitive literal.