summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-09-02 14:05:36 +0200
committerBen Gamari <bgamari.foss@gmail.com>2015-09-02 09:11:51 -0400
commit28ac9d31bcabeb44496c0e1750563f3091c62da9 (patch)
tree427a29e1beca0ee3fee7a1bc825bb5fa2fa03dae /docs
parentc8f623e305ec0a51ac2406a1f754d244e05b96f5 (diff)
downloadhaskell-28ac9d31bcabeb44496c0e1750563f3091c62da9.tar.gz
Improve the error messages for class instance errors
Summary: See Note [Displaying potential instances]. Reviewers: austin Subscribers: KaneTW, thomie Differential Revision: https://phabricator.haskell.org/D1176
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/flags.xml6
-rw-r--r--docs/users_guide/using.xml10
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index 0683752ee6..24917af252 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -36,6 +36,12 @@
<entry>-</entry>
</row>
<row>
+ <entry><option>-fprint-potential-instances</option></entry>
+ <entry>display all available instances in type error messages</entry>
+ <entry>dynamic</entry>
+ <entry>-fno-print-potential-instances</entry>
+ </row>
+ <row>
<entry><option>-fprint-explicit-foralls</option></entry>
<entry>Print explicit <literal>forall</literal> quantification in types. See also <option>-XExplicitForAll</option></entry>
<entry>dynamic</entry>
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index 502f7a3401..71d3467bbb 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -894,6 +894,16 @@ ghc -c Foo.hs
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--fprint-potential-instances</option>
+ <indexterm><primary><option>-fprint-potential-instances</option></primary></indexterm>
+ </term>
+ <listitem>
+ <para>When GHC can't find an instance for a class, it displays a short list of some
+ in the instances it knows about. With this flag it prints <emphasis>all</emphasis>
+ the instances it knows about.
+ </para></listitem>
+ </varlistentry>
<varlistentry>
<term><option>-fprint-explicit-foralls, -fprint-explicit-kinds, -fprint-unicode-syntax</option>