Safe Haskell | None |
---|
- type SuperKind = Type
- type Kind = Type
- typeKind :: Type -> Kind
- anyKind :: Kind
- liftedTypeKind :: Kind
- unliftedTypeKind :: Kind
- openTypeKind :: Kind
- constraintKind :: Kind
- mkArrowKind :: Kind -> Kind -> Kind
- mkArrowKinds :: [Kind] -> Kind -> Kind
- anyKindTyCon :: TyCon
- liftedTypeKindTyCon :: TyCon
- openTypeKindTyCon :: TyCon
- unliftedTypeKindTyCon :: TyCon
- constraintKindTyCon :: TyCon
- superKind :: Kind
- superKindTyCon :: TyCon
- pprKind :: Kind -> SDoc
- pprParendKind :: Kind -> SDoc
- kindAppResult :: Kind -> [Type] -> Kind
- synTyConResKind :: TyCon -> Kind
- splitKindFunTys :: Kind -> ([Kind], Kind)
- splitKindFunTysN :: Int -> Kind -> ([Kind], Kind)
- splitKindFunTy_maybe :: Kind -> Maybe (Kind, Kind)
- isLiftedTypeKind :: Kind -> Bool
- isUnliftedTypeKind :: Kind -> Bool
- isOpenTypeKind :: Kind -> Bool
- isConstraintKind :: Kind -> Bool
- isConstraintOrLiftedKind :: Kind -> Bool
- returnsConstraintKind :: Kind -> Bool
- isKind :: Kind -> Bool
- isKindVar :: Var -> Bool
- isSuperKind :: Type -> Bool
- isSuperKindTyCon :: TyCon -> Bool
- isLiftedTypeKindCon :: TyCon -> Bool
- isConstraintKindCon :: TyCon -> Bool
- isAnyKind :: Kind -> Bool
- isAnyKindCon :: TyCon -> Bool
- okArrowArgKind :: Kind -> Bool
- okArrowResultKind :: Kind -> Bool
- isSubOpenTypeKind :: Kind -> Bool
- isSubOpenTypeKindKey :: Unique -> Bool
- isSubKind :: Kind -> Kind -> Bool
- isSubKindCon :: TyCon -> TyCon -> Bool
- tcIsSubKind :: Kind -> Kind -> Bool
- tcIsSubKindCon :: TyCon -> TyCon -> Bool
- defaultKind :: Kind -> Kind
- defaultKind_maybe :: Kind -> Maybe Kind
- kiVarsOfKind :: Kind -> VarSet
- kiVarsOfKinds :: [Kind] -> VarSet
Main data type
Super kinds, used to help encode Kind
s as types.
Invariant: a super kind is always of this form:
TyConApp SuperKindTyCon ...
The key type representing kinds in the compiler. Invariant: a kind is always in one of these forms:
FunTy k1 k2 TyConApp PrimTyCon [...] TyVar kv -- (during inference only) ForAll ... -- (for top-level coercions)
mkArrowKinds :: [Kind] -> Kind -> KindSource
Iterated application of mkArrowKind
pprParendKind :: Kind -> SDocSource
Deconstructing Kinds
kindAppResult :: Kind -> [Type] -> KindSource
synTyConResKind :: TyCon -> KindSource
splitKindFunTys :: Kind -> ([Kind], Kind)Source
Essentially splitFunTys
on kinds
Predicates on Kinds
isLiftedTypeKind :: Kind -> BoolSource
isSuperKind :: Type -> BoolSource
Is this a super-kind (i.e. a type-of-kinds)?
isSuperKindTyCon :: TyCon -> BoolSource
isAnyKindCon :: TyCon -> BoolSource
okArrowArgKind :: Kind -> BoolSource
okArrowResultKind :: Kind -> BoolSource
isSubOpenTypeKind :: Kind -> BoolSource
True of any sub-kind of OpenTypeKind
isSubKind :: Kind -> Kind -> BoolSource
k1 `isSubKind` k2
checks that k1
<: k2
Sub-kinding is extremely simple and does not look
under arrrows or type constructors
isSubKindCon :: TyCon -> TyCon -> BoolSource
kc1 `isSubKindCon` kc2
checks that kc1
<: kc2
tcIsSubKind :: Kind -> Kind -> BoolSource
tcIsSubKindCon :: TyCon -> TyCon -> BoolSource
defaultKind :: Kind -> KindSource
defaultKind_maybe :: Kind -> Maybe KindSource
Used when generalising: default OpenKind and ArgKind to *. See Type for more information on what that means
Functions on variables
kiVarsOfKind :: Kind -> VarSetSource
kiVarsOfKinds :: [Kind] -> VarSetSource