[Add docs for DatatypeContexts extension Ian Lynagh **20100707230907 Ignore-this: 8158f03b35a2d7442a75fe85d6f1b1c7 ] hunk ./docs/users_guide/glasgow_exts.xml 1897 + +Data type contexts + +Haskell allows datatypes to be given contexts, e.g. + + +data Eq a => Set a = NilSet | ConsSet a (Set a) + + +give constructors with types: + + +NilSet :: Set a +ConsSet :: Eq a => a -> Set a -> Set a + + +In GHC this feature is an extension called +DatatypeContexts, and on by default. + +