[[project @ 2002-03-08 16:03:13 by simonpj]
simonpj**20020308160313
Documentation for more liberal class-method types
] {
hunk ./ghc/docs/users_guide/glasgow_exts.sgml 41
+
+ Class method types:
+
+
+
+
+
hunk ./ghc/docs/users_guide/glasgow_exts.sgml 638
+
+Class method types
+
+
+Haskell 98 prohibits class method types to mention constraints on the
+class type variable, thus:
+
+ class Seq s a where
+ fromList :: [a] -> s a
+ elem :: Eq a => a -> s a -> Bool
+
+The type of elem is illegal in Haskell 98, because it
+contains the constraint Eq a, constrains only the
+class type variable (in this case a).
+
+
+With the GHC lifts this restriction.
+
+
+
+
}