summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/users_guide/exts/quantified_constraints.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/users_guide/exts/quantified_constraints.rst b/docs/users_guide/exts/quantified_constraints.rst
index 769570fea2..2ed53b6c4a 100644
--- a/docs/users_guide/exts/quantified_constraints.rst
+++ b/docs/users_guide/exts/quantified_constraints.rst
@@ -18,7 +18,7 @@ which give a new level of expressiveness in constraints. For example, consider :
instance (Eq a, ???) => Eq (Rose f a)
where
(Branch x1 c1) == (Branch x2 c2)
- = x1==x1 && c1==c2
+ = x1==x2 && c1==c2
From the ``x1==x2`` we need ``Eq a``, which is fine. From ``c1==c2`` we need ``Eq (f (Rose f a))`` which
is *not* fine in Haskell today; we have no way to solve such a constraint.
@@ -29,7 +29,7 @@ is *not* fine in Haskell today; we have no way to solve such a constraint.
=> Eq (Rose f a)
where
(Branch x1 c1) == (Branch x2 c2)
- = x1==x1 && c1==c2
+ = x1==x2 && c1==c2
Here, the quantified constraint ``forall b. (Eq b) => Eq (f b)`` behaves
a bit like a local instance declaration, and makes the instance typeable.