|Version 1 (modified by ross@…, 9 years ago) (diff)|
In Haskell 98,
- contexts of type signarures, newtype and data declarations consist of assertions of the form C v or C (v t1 ... tn), where v is a type variable. Contexts on newtype and data declarations are RemovalCandidates.
- contexts of instance and class declarations consist of assertions of the form C v, where v is a type variable.
The proposal is that class arguments in contexts of type signatures and class declarations may be arbitrary types, e.g.
g :: (C [a], D (a -> b)) => [a] -> b
(Similar relaxation of instance declarations leads to UndecidableInstances.)
- Syntax of Class Assertions and Contexts in the Haskell 98 Report
- Type classes: exploring the design space by Simon Peyton Jones, Mark Jones and Erik Meijer, Haskell Workshop 1997.
- Type signatures in the GHC User's Guide