Document overlapping instances more clearly
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 18 Jan 2013 17:07:04 +0000 (17:07 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 18 Jan 2013 17:07:04 +0000 (17:07 +0000)
docs/users_guide/glasgow_exts.xml

index 98c43c2..1191a16 100644 (file)
@@ -4397,6 +4397,12 @@ The constraint <literal>C Int [Int]</literal> matches instances (A),
 most-specific match, the program is rejected.
 </para>
 <para>
+An instance declaration is <emphasis>more specific</emphasis> than another iff 
+the head of former is a substitution instance of the latter. For example
+(D) is "more specific" than (C) because you can get from (C) to (D) by 
+substituting <literal>a:=Int</literal>.
+</para>
+<para>
 However, GHC is conservative about committing to an overlapping instance.  For example:
 <programlisting>
   f :: [b] -> [b]