X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=9fea7a4736f7976853d3d2db46d62c29118cf9e6;hb=f61baf76c9fa20aa972938384887bcb52151e76f;hp=b7d43c9f3fd80a77247c11acec0527835e47182b;hpb=661c97c65e5fa47177502e592bb763f752b487ac;p=ghc-hetmet.git
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index b7d43c9..9fea7a4 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -818,10 +818,8 @@ let {(x -> y) = e1 ;
(y -> x) = e2 } in x
-(We may lift this
-restriction in the future; the only cost is that type checking patterns
-would get a little more complicated.)
-
+(For some amplification on this design choice see
+Trac #4061.)
@@ -1896,6 +1894,26 @@ not * then an explicit kind annotation must be used
Nevertheless, they can be useful when defining "phantom types".
+
+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.
+
+
Infix type constructors, classes, and type variables
@@ -9079,7 +9097,6 @@ standard behaviour.