Commit b19d9770 authored by simonmar's avatar simonmar
Browse files

[project @ 2001-08-14 11:41:19 by simonmar]

Fix example code in the generics section.
parent 2767767f
......@@ -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.)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment