X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=9fea7a4736f7976853d3d2db46d62c29118cf9e6;hb=f61baf76c9fa20aa972938384887bcb52151e76f;hp=4668bbb034d8b92a521ab2922dc3fad025a246d0;hpb=cfdf2515dd5b491f8229d44b98fa33adeeac7e60;p=ghc-hetmet.git
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 4668bbb..9fea7a4 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -400,14 +400,6 @@ Indeed, the bindings can even be recursive.
LEFTWARDS ARROW
-
-
- ..
- …
- 0x22EF
- MIDLINE HORIZONTAL ELLIPSIS
-
-
@@ -826,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.)
@@ -911,7 +901,7 @@ it, you can use the flag.
-
+The recursive do-notation
@@ -932,7 +922,7 @@ justOnes = do { rec { xs <- Just (1:xs) }
As you can guess justOnes will evaluate to Just [-1,-1,-1,....
-The background and motivation for recusrive do-notation is described in
+The background and motivation for recursive do-notation is described in
A recursive do for Haskell,
by Levent Erkok, John Launchbury,
Haskell Workshop 2002, pages: 29-37. Pittsburgh, Pennsylvania.
@@ -1047,7 +1037,7 @@ It supports rebindable syntax (see ).
- Mdo-notation (deprecated)
+ Mdo-notation (deprecated) GHC used to support the flag ,
which enabled the keyword mdo, precisely as described in
@@ -1697,7 +1687,7 @@ and the fixity declaration applies wherever the binding is in scope.
For example, in a let, it applies in the right-hand
sides of other let-bindings and the body of the
letC. Or, in recursive do
-expressions (), the local fixity
+expressions (), the local fixity
declarations of a let statement scope over other
statements in the group, just as the bound name does.
@@ -1904,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
@@ -9087,7 +9097,6 @@ standard behaviour.