Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
b19d9770
Commit
b19d9770
authored
Aug 14, 2001
by
simonmar
Browse files
[project @ 2001-08-14 11:41:19 by simonmar]
Fix example code in the generics section.
parent
2767767f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/docs/users_guide/glasgow_exts.sgml
View file @
b19d9770
...
...
@@ -3415,10 +3415,10 @@ So this too is illegal:
<programlisting>
class Foo a where
op1 :: a -> Bool
op {| a :*: b |} (
Inl x
) = True
op
1
{| a :*: b |} (
x :*: y
) = True
op2 :: a -> Bool
op {| p :*: q |} (
Inr
y) = False
op
2
{| 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.)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment