• Vladislav Zavialov's avatar
    Standalone kind signatures (#16794) · 0b5eede9
    Vladislav Zavialov authored
    Implements GHC Proposal #54: .../ghc-proposals/blob/master/proposals/0054-kind-signatures.rst
    
    With this patch, a type constructor can now be given an explicit
    standalone kind signature:
    
      {-# LANGUAGE StandaloneKindSignatures #-}
      type Functor :: (Type -> Type) -> Constraint
      class Functor f where
        fmap :: (a -> b) -> f a -> f b
    
    This is a replacement for CUSKs (complete user-specified
    kind signatures), which are now scheduled for deprecation.
    
    User-facing changes
    -------------------
    
    * A new extension flag has been added, -XStandaloneKindSignatures, which
      implies -XNoCUSKs.
    
    * There is a new syntactic construct, a standalone kind signature:
    
        type <name> :: <kind>
    
      Declarations of data types, classes, data families, type families, and
      type synonyms may be accompanied by a standalone kind signature.
    
    * A standalone kind signature enables polymorphic recursion in types,
      just like a function type signature enables polymorphic recursion in
      terms. This o...
    0b5eede9
Code owners : Ben Gamari
HieAst.hs 60.6 KB