Add a pointer to the fundeps paper
[ghc-hetmet.git] / docs / users_guide / glasgow_exts.xml
index 0beed8e..fd6e322 100644 (file)
@@ -2061,6 +2061,11 @@ something more specific does not:
     op = ... -- Default
 </programlisting>
 </para>
+<para>You can find lots of background material about the reason for these
+restrictions in the paper <ulink
+url="http://research.microsoft.com/%7Esimonpj/papers/fd%2Dchr/">
+Understanding functional dependencies via Constraint Handling Rules</ulink>.
+</para>
 </sect3>
 
 <sect3 id="undecidable-instances">
@@ -2505,7 +2510,7 @@ function that called it. For example, our <literal>sort</literal> function might
 to pick out the least value in a list:
 <programlisting>
   least   :: (?cmp :: a -> a -> Bool) => [a] -> a
-  least xs = fst (sort xs)
+  least xs = head (sort xs)
 </programlisting>
 Without lifting a finger, the <literal>?cmp</literal> parameter is
 propagated to become a parameter of <literal>least</literal> as well. With explicit