Safe Haskell | Safe-Infered |
---|
- takeNameOfBind :: Bind n -> Maybe n
- typeOfBind :: Bind n -> Type n
- replaceTypeOfBind :: Type n -> Bind n -> Bind n
- binderOfBind :: Bind n -> Binder n
- makeBindFromBinder :: Binder n -> Type n -> Bind n
- partitionBindsByType :: Eq n => [Bind n] -> [([Binder n], Type n)]
- typeOfBound :: Bound n -> Type n
- takeNameOfBound :: Bound n -> Maybe n
- replaceTypeOfBound :: Type n -> Bound n -> Bound n
- boundMatchesBind :: Eq n => Bound n -> Bind n -> Bool
- namedBoundMatchesBind :: Eq n => Bound n -> Bind n -> Bool
- takeSubstBoundOfBind :: Bind n -> Maybe (Bound n)
- tIx :: Kind n -> Int -> Type n
- tApp, ($:) :: Type n -> Type n -> Type n
- tApps :: Type n -> [Type n] -> Type n
- takeTApps :: Type n -> [Type n]
- takeTyConApps :: Type n -> Maybe (TyCon n, [Type n])
- takeDataTyConApps :: Type n -> Maybe (TyCon n, [Type n])
- tForall :: Kind n -> (Type n -> Type n) -> Type n
- tForalls :: [Kind n] -> ([Type n] -> Type n) -> Type n
- takeTForalls :: Type n -> Maybe ([Bind n], Type n)
- tBot :: Kind n -> Type n
- tSum :: Ord n => Kind n -> [Type n] -> Type n
- kFun :: Kind n -> Kind n -> Kind n
- kFuns :: [Kind n] -> Kind n -> Kind n
- takeKFun :: Kind n -> Maybe (Kind n, Kind n)
- takeKFuns :: Kind n -> ([Kind n], Kind n)
- takeKFuns' :: Kind n -> [Kind n]
- takeResultKind :: Kind n -> Kind n
- tFun :: Type n -> Effect n -> Closure n -> Type n -> Type n
- takeTFun :: Type n -> Maybe (Type n, Effect n, Closure n, Type n)
- takeTFunArgResult :: Type n -> ([Type n], Type n)
- tFunPE :: Type n -> Type n -> Type n
- tImpl :: Type n -> Type n -> Type n
- sComp :: Type n
- sProp :: Type n
- kData :: Type n
- kRegion :: Type n
- kEffect :: Type n
- kClosure :: Type n
- kWitness :: Type n
- tRead :: Type n -> Type n
- tDeepRead :: Type n -> Type n
- tHeadRead :: Type n -> Type n
- tWrite :: Type n -> Type n
- tDeepWrite :: Type n -> Type n
- tAlloc :: Type n -> Type n
- tDeepAlloc :: Type n -> Type n
- tUse :: Type n -> Type n
- tDeepUse :: Type n -> Type n
- tPure :: Type n -> Type n
- tEmpty :: Type n -> Type n
- tGlobal :: Type n -> Type n
- tDeepGlobal :: Type n -> Type n
- tConst :: Type n -> Type n
- tDeepConst :: Type n -> Type n
- tMutable :: Type n -> Type n
- tDeepMutable :: Type n -> Type n
- tLazy :: Type n -> Type n
- tHeadLazy :: Type n -> Type n
- tManifest :: Type n -> Type n
- tConData0 :: n -> Kind n -> Type n
- tConData1 :: n -> Kind n -> Type n -> Type n
Binds
takeNameOfBind :: Bind n -> Maybe nSource
Take the variable name of a bind. If this is an anonymous binder then there won't be a name.
typeOfBind :: Bind n -> Type nSource
Take the type of a bind.
replaceTypeOfBind :: Type n -> Bind n -> Bind nSource
Replace the type of a bind with a new one.
Binders
binderOfBind :: Bind n -> Binder nSource
Take the binder of a bind.
makeBindFromBinder :: Binder n -> Type n -> Bind nSource
Make a bind from a binder and its type.
partitionBindsByType :: Eq n => [Bind n] -> [([Binder n], Type n)]Source
Make lists of binds that have the same type.
Bounds
typeOfBound :: Bound n -> Type nSource
Take the type of a bound variable.
takeNameOfBound :: Bound n -> Maybe nSource
Take the name of bound variable. If this is a deBruijn index then there won't be a name.
replaceTypeOfBound :: Type n -> Bound n -> Bound nSource
Replace the type of a bound with a new one.
namedBoundMatchesBind :: Eq n => Bound n -> Bind n -> BoolSource
Check whether a named bound matches a named bind.
Yields False
if they are not named or have different names.
takeSubstBoundOfBind :: Bind n -> Maybe (Bound n)Source
Type structure
takeTApps :: Type n -> [Type n]Source
Flatten a sequence ot type applications into the function part and arguments, if any.
takeTyConApps :: Type n -> Maybe (TyCon n, [Type n])Source
Flatten a sequence of type applications, returning the type constructor and arguments, if there is one.
takeDataTyConApps :: Type n -> Maybe (TyCon n, [Type n])Source
Flatten a sequence of type applications, returning the type constructor and arguments, if there is one. Only accept data type constructors.
tForall :: Kind n -> (Type n -> Type n) -> Type nSource
Build an anonymous type abstraction, with a single parameter.
tForalls :: [Kind n] -> ([Type n] -> Type n) -> Type nSource
Build an anonymous type abstraction, with several parameters.
takeTForalls :: Type n -> Maybe ([Bind n], Type n)Source
Split nested foralls from the front of a type,
or Nothing
if there was no outer forall.
Function type construction
takeKFuns :: Kind n -> ([Kind n], Kind n)Source
Destruct a chain of kind functions into the arguments
takeKFuns' :: Kind n -> [Kind n]Source
Like takeKFuns
, but return argument and return kinds in the same list.
takeResultKind :: Kind n -> Kind nSource
Take the result kind of a kind function, or return the same kind unharmed if it's not a kind function.
tFun :: Type n -> Effect n -> Closure n -> Type n -> Type nSource
Construct a value type function, with the provided effect and closure.
takeTFun :: Type n -> Maybe (Type n, Effect n, Closure n, Type n)Source
Destruct the type of a value function.
takeTFunArgResult :: Type n -> ([Type n], Type n)Source
Destruct the type of a value function, returning just the argument and result types.
Sort construction
Kind construction
Effect type constructors
tDeepWrite :: Type n -> Type nSource
tDeepAlloc :: Type n -> Type nSource
Closure type constructors.
Witness type constructors.
tDeepGlobal :: Type n -> Type nSource
tDeepConst :: Type n -> Type nSource
tDeepMutable :: Type n -> Type nSource