- type Kind = Type
- typeKind :: Type -> Kind
- liftedTypeKind, ubxTupleKind, argTypeKind, openTypeKind, unliftedTypeKind :: Kind
- mkArrowKind :: Kind -> Kind -> Kind
- mkArrowKinds :: [Kind] -> Kind -> Kind
- tySuperKindTyCon, argTypeKindTyCon, ubxTupleKindTyCon, unliftedTypeKindTyCon, openTypeKindTyCon, liftedTypeKindTyCon :: TyCon
- tySuperKind :: SuperKind
- pprKind, pprParendKind :: Kind -> SDoc
- kindFunResult :: Kind -> Kind
- kindAppResult :: Kind -> [arg] -> Kind
- synTyConResKind :: TyCon -> Kind
- splitKindFunTys :: Kind -> ([Kind], Kind)
- splitKindFunTysN :: Int -> Kind -> ([Kind], Kind)
- splitKindFunTy_maybe :: Kind -> Maybe (Kind, Kind)
- isLiftedTypeKind :: Kind -> Bool
- isUbxTupleKind, isUnliftedTypeKind, isArgTypeKind, isOpenTypeKind :: Kind -> Bool
- isKind :: Kind -> Bool
- isTySuperKind :: SuperKind -> Bool
- isSuperKind :: Type -> Bool
- isCoercionKind :: Kind -> Bool
- isLiftedTypeKindCon :: TyCon -> Bool
- isSubArgTypeKind :: Kind -> Bool
- isSubOpenTypeKind :: Kind -> Bool
- isSubKind :: Kind -> Kind -> Bool
- defaultKind :: Kind -> Kind
- isSubKindCon :: TyCon -> TyCon -> Bool
Main data type
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
tySuperKindTyCon, argTypeKindTyCon, ubxTupleKindTyCon, unliftedTypeKindTyCon, openTypeKindTyCon, liftedTypeKindTyCon :: TyConSource
tySuperKind :: SuperKindSource
pprKind, pprParendKind :: Kind -> SDocSource
Deconstructing Kinds
kindFunResult :: Kind -> KindSource
Essentially funResultTy
on kinds
kindAppResult :: Kind -> [arg] -> KindSource
synTyConResKind :: TyCon -> KindSource
splitKindFunTys :: Kind -> ([Kind], Kind)Source
Essentially splitFunTys
on kinds
Predicates on Kinds
isLiftedTypeKind :: Kind -> BoolSource
isTySuperKind :: SuperKind -> BoolSource
isSuperKind :: Type -> BoolSource
Is this a super-kind (i.e. a type-of-kinds)?
isCoercionKind :: Kind -> BoolSource
isSubArgTypeKind :: Kind -> BoolSource
True of any sub-kind of ArgTypeKind
isSubOpenTypeKind :: Kind -> BoolSource
True of any sub-kind of OpenTypeKind (i.e. anything except arrow)
defaultKind :: Kind -> KindSource
Used when generalising: default kind ? and ?? to *. See Type for more information on what that means
isSubKindCon :: TyCon -> TyCon -> BoolSource
kc1 `isSubKindCon` kc2
checks that kc1
<: kc2