Safe Haskell | None |
---|
- type Kind = Type
- typeKind :: Type -> Kind
- anyKind :: Kind
- liftedTypeKind :: Kind
- unliftedTypeKind :: Kind
- openTypeKind :: Kind
- argTypeKind :: Kind
- ubxTupleKind :: Kind
- constraintKind :: Kind
- mkArrowKind :: Kind -> Kind -> Kind
- mkArrowKinds :: [Kind] -> Kind -> Kind
- anyKindTyCon :: TyCon
- liftedTypeKindTyCon :: TyCon
- openTypeKindTyCon :: TyCon
- unliftedTypeKindTyCon :: TyCon
- argTypeKindTyCon :: TyCon
- ubxTupleKindTyCon :: TyCon
- constraintKindTyCon :: TyCon
- tySuperKind :: SuperKind
- tySuperKindTyCon :: TyCon
- pprKind :: Kind -> SDoc
- 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
- isUnliftedTypeKind :: Kind -> Bool
- isOpenTypeKind :: Kind -> Bool
- isUbxTupleKind :: Kind -> Bool
- isArgTypeKind :: Kind -> Bool
- isConstraintKind :: Kind -> Bool
- isConstraintOrLiftedKind :: Kind -> Bool
- isKind :: Kind -> Bool
- isSuperKind :: Type -> Bool
- noHashInKind :: Kind -> Bool
- isLiftedTypeKindCon :: TyCon -> Bool
- isConstraintKindCon :: TyCon -> Bool
- isAnyKind :: Kind -> Bool
- isAnyKindCon :: TyCon -> Bool
- isSubArgTypeKind :: Kind -> Bool
- tcIsSubArgTypeKind :: Kind -> Bool
- isSubOpenTypeKind :: Kind -> Bool
- tcIsSubOpenTypeKind :: Kind -> Bool
- isSubKind :: Kind -> Kind -> Bool
- tcIsSubKind :: Kind -> Kind -> Bool
- defaultKind :: Kind -> Kind
- isSubKindCon :: TyCon -> TyCon -> Bool
- tcIsSubKindCon :: TyCon -> TyCon -> Bool
- isSubOpenTypeKindCon :: 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)
mkArrowKinds :: [Kind] -> Kind -> KindSource
Iterated application of mkArrowKind
tySuperKind :: SuperKindSource
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
isSuperKind :: Type -> BoolSource
Is this a super-kind (i.e. a type-of-kinds)?
noHashInKind :: Kind -> BoolSource
isAnyKindCon :: TyCon -> BoolSource
isSubArgTypeKind :: Kind -> BoolSource
True of any sub-kind of ArgTypeKind
tcIsSubArgTypeKind :: Kind -> BoolSource
True of any sub-kind of ArgTypeKind
isSubOpenTypeKind :: Kind -> BoolSource
True of any sub-kind of OpenTypeKind
True of any sub-kind of OpenTypeKind
tcIsSubOpenTypeKind :: Kind -> BoolSource
True of any sub-kind of OpenTypeKind
tcIsSubKind :: Kind -> Kind -> BoolSource
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