Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class SimpleType t => HigherOrder t where
- type Kindsystem t :: *
- type KindContext t :: *
- type KindError t :: *
- (/$) :: HigherOrder t => t -> t -> t
Documentation
class SimpleType t => HigherOrder t where Source #
Typeclass for higher-order types. Classically this would just be checking the arity of type constructors but there are more complex typesystems that exist that could benefit from allowing an arbitrary typechecking ability for a higher-order typesystem.
type Kindsystem t :: * Source #
The typesystem for the kindedness of type expressions.
type KindContext t :: * Source #
A typing context for the kindedness of type expressions. Analogue to TypingContext
.
type KindError t :: * Source #
Type errors for the kindedness of type expressions. Analogue to TypeError
.
kindcheck :: KindContext t -> t -> Either [KindError t] (KindContext t, Kindsystem t) Source #
Typecheck a type expression.
(Ord m, Ord p, Ord k, Inferable (SystemFOmega m p) k, (~) * (TypingContext (SystemFOmega m p) k) (InferenceContext (SystemFOmega m p) k)) => HigherOrder (SystemFOmega m p (Maybe k)) Source # | |
(/$) :: HigherOrder t => t -> t -> t infixl 8 Source #
Infix typeap
.