|Version 1 (modified by 11 years ago) (diff),|
In Haskell 98,
- contexts of type signarures,
datadeclarations consist of assertions of the form C v or C (v t1 … tn), where v is a type variable. Contexts on
datadeclarations are RemovalCandidates.
- contexts of
classdeclarations 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