Version 3 (modified by benl, 6 years ago)

--

Kinds

Kind
    ::=  SimpleKind
     |   SimpleKind -> Kind

SimpleKind
    ::=  *                      -- value type kind
     |   %                      -- region kind
     |   !                      -- effect kind
     |   $                      -- closure kind
     |   +                      -- witness kind
     |   (  Kind  ) 

Types

Type
    ::=  SimpleType
     |   forall  TyVarKind+  .  ConstrainedType

TyVarKind 
    ::=  TyVar  
     |   (  TyVar  ::  Kind  )               -- check this
  
ConstrainedType
    ::=  SimpleType
     |   SimpleType  :-  Constraint  ,Constraint*
     |   Context     =>  ConstrainedType

Context 
    ::=  ClassConstraint
     |   ClassConstraint  =>ClassConstraint*
     |   (  ClassConstraint  ,ClassConstraint*  )

SimpleType
    ::=