Safe Haskell | None |
---|---|
Language | Haskell2010 |
Kind
Synopsis
- type Kind = Type
- isLiftedTypeKind :: Kind -> Bool
- isUnliftedTypeKind :: Kind -> Bool
- isConstraintKind :: Kind -> Bool
- isTYPEApp :: Kind -> Maybe DataCon
- returnsTyCon :: Unique -> Type -> Bool
- returnsConstraintKind :: Kind -> Bool
- isConstraintKindCon :: TyCon -> Bool
- classifiesTypeWithValues :: Kind -> Bool
- tcIsLiftedTypeKind :: Kind -> Bool
- isKindLevPoly :: Kind -> Bool
Main data type
Predicates on Kinds
isLiftedTypeKind :: Kind -> Bool Source #
This version considers Constraint to be the same as *. Returns True if the argument is equivalent to Type/Constraint and False otherwise. See Note [Kind Constraint and kind Type]
isUnliftedTypeKind :: Kind -> Bool Source #
Returns True if the kind classifies unlifted types and False otherwise. Note that this returns False for levity-polymorphic kinds, which may be specialized to a kind that classifies unlifted types.
isConstraintKind :: Kind -> Bool Source #
returnsTyCon :: Unique -> Type -> Bool Source #
Does the given type "end" in the given tycon? For example k -> [a] -> *
ends in *
and Maybe a -> [a]
ends in []
.
returnsConstraintKind :: Kind -> Bool Source #
isConstraintKindCon :: TyCon -> Bool Source #
classifiesTypeWithValues :: Kind -> Bool Source #
Does this classify a type allowed to have values? Responds True to things like *, #, TYPE Lifted, TYPE v, Constraint.
True of any sub-kind of OpenTypeKind
tcIsLiftedTypeKind :: Kind -> Bool Source #
Is this kind equivalent to *
?
This considers Constraint
to be distinct from *
. For a version that
treats them as the same type, see isLiftedTypeKind
.
isKindLevPoly :: Kind -> Bool Source #
Tests whether the given kind (which should look like TYPE x
)
is something other than a constructor tree (that is, constructors at every node).
E.g. True of TYPE k, TYPE (F Int)
False of TYPE 'LiftedRep