[project @ 2001-08-14 11:41:19 by simonmar]
authorsimonmar <unknown>
Tue, 14 Aug 2001 11:41:19 +0000 (11:41 +0000)
committersimonmar <unknown>
Tue, 14 Aug 2001 11:41:19 +0000 (11:41 +0000)
Fix example code in the generics section.

ghc/docs/users_guide/glasgow_exts.sgml

index abe513a..1374ac4 100644 (file)
@@ -3415,10 +3415,10 @@ So this too is illegal:
 <programlisting>
   class Foo a where
     op1 :: a -> Bool
-    op {| a :*: b |} (Inl x) = True
+    op1 {| a :*: b |} (x :*: y) = True
 
     op2 :: a -> Bool
-    op {| p :*: q |} (Inr y) = False
+    op2 {| p :*: q |} (x :*: y) = False
 </programlisting>
 (The reason for this restriction is that we gather all the equations for a particular type consructor
 into a single generic instance declaration.)