Safe Haskell | Safe-Infered |
---|
- type Kind = Type
- typeKind :: Type -> Kind
- anyKind, constraintKind, ubxTupleKind, argTypeKind, openTypeKind, unliftedTypeKind, liftedTypeKind :: Kind
- mkArrowKind :: Kind -> Kind -> Kind
- mkArrowKinds :: [Kind] -> Kind -> Kind
- tySuperKindTyCon, constraintKindTyCon, argTypeKindTyCon, ubxTupleKindTyCon, unliftedTypeKindTyCon, openTypeKindTyCon, liftedTypeKindTyCon, anyKindTyCon :: TyCon
- tySuperKind :: SuperKind
- pprKind, pprParendKind :: Kind -> SDoc
- kindFunResult :: Kind -> KindOrType -> Kind
- 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
- isUbxTupleKind, isConstraintOrLiftedKind, isAnyKind, isConstraintKind, isUnliftedTypeKind, isArgTypeKind, isOpenTypeKind :: Kind -> Bool
- isKind :: Kind -> Bool
- isSuperKind :: Type -> Bool
- noHashInKind :: Kind -> Bool
- isLiftedTypeKindCon :: TyCon -> Bool
- isAnyKindCon, isConstraintKindCon, isSubOpenTypeKindCon :: TyCon -> Bool
- isSubArgTypeKind, tcIsSubArgTypeKind :: Kind -> Bool
- isSubOpenTypeKind, tcIsSubOpenTypeKind :: Kind -> Bool
- isSubKind, tcIsSubKind :: Kind -> Kind -> Bool
- defaultKind :: Kind -> Kind
- isSubKindCon :: TyCon -> TyCon -> Bool
- tcIsSubKindCon :: TyCon -> TyCon -> Bool
- isKiVar :: TyVar -> Bool
- splitKiTyVars :: [TyVar] -> ([KindVar], [TyVar])
- partitionKiTyVars :: [TyVar] -> ([KindVar], [TyVar])
- kiVarsOfKind :: Kind -> VarSet
- kiVarsOfKinds :: [Kind] -> VarSet
- promoteType :: Type -> Kind
- isPromotableType :: Type -> Bool
- isPromotableKind :: Kind -> Maybe Int
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)
anyKind, constraintKind, ubxTupleKind, argTypeKind, openTypeKind, unliftedTypeKind, liftedTypeKind :: KindSource
mkArrowKinds :: [Kind] -> Kind -> KindSource
Iterated application of mkArrowKind
tySuperKindTyCon, constraintKindTyCon, argTypeKindTyCon, ubxTupleKindTyCon, unliftedTypeKindTyCon, openTypeKindTyCon, liftedTypeKindTyCon, anyKindTyCon :: TyConSource
tySuperKind :: SuperKindSource
pprKind, pprParendKind :: Kind -> SDocSource
Deconstructing Kinds
kindFunResult :: Kind -> KindOrType -> KindSource
Essentially funResultTy
on kinds handling pi-types too
kindAppResult :: Kind -> [Type] -> KindSource
synTyConResKind :: TyCon -> KindSource
splitKindFunTys :: Kind -> ([Kind], Kind)Source
Essentially splitFunTys
on kinds
Predicates on Kinds
isLiftedTypeKind :: Kind -> BoolSource
isUbxTupleKind, isConstraintOrLiftedKind, isAnyKind, isConstraintKind, isUnliftedTypeKind, isArgTypeKind, isOpenTypeKind :: Kind -> BoolSource
isSuperKind :: Type -> BoolSource
Is this a super-kind (i.e. a type-of-kinds)?
noHashInKind :: Kind -> BoolSource
isSubArgTypeKind, tcIsSubArgTypeKind :: Kind -> BoolSource
True of any sub-kind of ArgTypeKind
isSubOpenTypeKind, tcIsSubOpenTypeKind :: Kind -> BoolSource
True of any sub-kind of OpenTypeKind
True of any sub-kind of OpenTypeKind
defaultKind :: Kind -> KindSource
Used when generalising: default OpenKind and ArgKind to *. See Type for more information on what that means
isSubKindCon :: TyCon -> TyCon -> BoolSource
kc1 `isSubKindCon` kc2
checks that kc1
<: kc2
tcIsSubKindCon :: TyCon -> TyCon -> BoolSource
Functions on variables
splitKiTyVars :: [TyVar] -> ([KindVar], [TyVar])Source
partitionKiTyVars :: [TyVar] -> ([KindVar], [TyVar])Source
kiVarsOfKind :: Kind -> VarSetSource
kiVarsOfKinds :: [Kind] -> VarSetSource
Promotion related functions
promoteType :: Type -> KindSource
Promotes a type to a kind. Assumes the argument is promotable.
isPromotableType :: Type -> BoolSource
isPromotableKind :: Kind -> Maybe IntSource