Safe Haskell | None |
---|---|
Language | Haskell98 |
- 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)
See "Type#kind_subtyping" for details of the distinction between these Kind
s
unliftedTypeKind :: Kind Source
See "Type#kind_subtyping" for details of the distinction between these Kind
s
See "Type#kind_subtyping" for details of the distinction between these Kind
s
See "Type#kind_subtyping" for details of the distinction between these Kind
s
mkArrowKinds :: [Kind] -> Kind -> Kind Source
Iterated application of mkArrowKind
See "Type#kind_subtyping" for details of the distinction between these Kind
s
pprParendKind :: Kind -> SDoc Source
Deconstructing Kinds
kindAppResult :: Kind -> [Type] -> Kind Source
synTyConResKind :: TyCon -> Kind Source
splitKindFunTys :: Kind -> ([Kind], Kind) Source
Essentially splitFunTys
on kinds
Predicates on Kinds
isLiftedTypeKind :: Kind -> Bool Source
isUnliftedTypeKind :: Kind -> Bool Source
See "Type#kind_subtyping" for details of the distinction between these Kind
s
isOpenTypeKind :: Kind -> Bool Source
See "Type#kind_subtyping" for details of the distinction between these Kind
s
isConstraintKind :: Kind -> Bool Source
See "Type#kind_subtyping" for details of the distinction between these Kind
s
isConstraintOrLiftedKind :: Kind -> Bool Source
See "Type#kind_subtyping" for details of the distinction between these Kind
s
returnsConstraintKind :: Kind -> Bool Source
isSuperKind :: Type -> Bool Source
Is this a super-kind (i.e. a type-of-kinds)?
isSuperKindTyCon :: TyCon -> Bool Source
isLiftedTypeKindCon :: TyCon -> Bool Source
isConstraintKindCon :: TyCon -> Bool Source
isAnyKind :: Kind -> Bool Source
See "Type#kind_subtyping" for details of the distinction between these Kind
s
isAnyKindCon :: TyCon -> Bool Source
okArrowArgKind :: Kind -> Bool Source
okArrowResultKind :: Kind -> Bool Source
isSubOpenTypeKind :: Kind -> Bool Source
True of any sub-kind of OpenTypeKind
isSubOpenTypeKindKey :: Unique -> Bool Source
isSubKind :: Kind -> Kind -> Bool Source
k1 `isSubKind` k2
checks that k1
<: k2
Sub-kinding is extremely simple and does not look
under arrrows or type constructors
isSubKindCon :: TyCon -> TyCon -> Bool Source
kc1 `isSubKindCon` kc2
checks that kc1
<: kc2
tcIsSubKind :: Kind -> Kind -> Bool Source
tcIsSubKindCon :: TyCon -> TyCon -> Bool Source
defaultKind :: Kind -> Kind Source
defaultKind_maybe :: Kind -> Maybe Kind Source
Used when generalising: default OpenKind and ArgKind to *. See "Type#kind_subtyping" for more information on what that means
Functions on variables
kiVarsOfKind :: Kind -> VarSet Source
kiVarsOfKinds :: [Kind] -> VarSet Source