Correct an example in the users guide
authorIan Lynagh <igloo@earth.li>
Sun, 16 Nov 2008 17:49:38 +0000 (17:49 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 16 Nov 2008 17:49:38 +0000 (17:49 +0000)
docs/users_guide/glasgow_exts.xml

index 393cbf5..2883757 100644 (file)
@@ -2002,9 +2002,9 @@ of the data constructor.  For GADTs, the field may mention only types
 that appear as a simple type-variable argument in the constructor's result
 type</emphasis>.  For example:
 <programlisting>
-data T a where { T1 { f1::a, f2::(a,b) } :: T a }    -- b is existential
-upd1 t x = t { f1=x }   -- OK:   upd1 :: T a -> b -> T b
-upd2 t x = t { f2=x }   -- BAD   (f2's type mentions b, which is
+data T a b where { T1 { f1::a, f2::b, f3::(b,c) } :: T a b } -- c is existential
+upd1 t x = t { f1=x }   -- OK:   upd1 :: T a b -> a' -> T a' b
+upd2 t x = t { f3=x }   -- BAD   (f3's type mentions c, which is
                         --        existentially quantified)
 
 data G a b where { G1 { g1::a, g2::c } :: G a [c] }