Commit 8e14697c authored by simonpj's avatar simonpj
Browse files

[project @ 2005-03-02 18:15:36 by simonpj]

Clarification re overlapping instances; merge to stable
parent 877e2944
......@@ -1731,7 +1731,7 @@ means
<sect2 id="instance-decls">
<title>Instance declarations</title>
<sect3 id="instance-overlap">
<title>Overlapping instances</title>
In general, <emphasis>GHC requires that that it be unambiguous which instance
......@@ -1787,6 +1787,11 @@ So GHC rejects the program. If you add the flag <option>-fallow-incoherent-inst
GHC will instead pick (C), without complaining about
the problem of subsequent instantiations.
Because overlaps are checked and reported lazily, as described above, you need
the <option>-fallow-overlapping-instances</option> in the module that <emphasis>calls</emphasis>
the overloaded function, rather than in the module that <emphasis>defines</emphasis> it.</para>
Supports Markdown
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