fix bug in sample code
[ghc-hetmet.git] / docs / users_guide / glasgow_exts.xml
index 3801f96..9c1b2c7 100644 (file)
@@ -617,7 +617,7 @@ clunky env var1 var1 = case lookup env var1 of
     Nothing -> fail
     Just val2 -> val1 + val2
 where
-  fail = val1 + val2
+  fail = var1 + var2
 </programlisting>
 
 <para>
@@ -2107,7 +2107,9 @@ can be modified by two flags: <option>-fallow-overlapping-instances</option>
 </primary></indexterm> 
 and <option>-fallow-incoherent-instances</option>
 <indexterm><primary>-fallow-incoherent-instances
-</primary></indexterm>, as this section discusses.</para>
+</primary></indexterm>, as this section discusses.  Both these
+flags are dynamic flags, and can be set on a per-module basis, using 
+an <literal>OPTIONS_GHC</literal> pragma if desired (<xref linkend="source-file-options"/>).</para>
 <para>
 When GHC tries to resolve, say, the constraint <literal>C Int Bool</literal>,
 it tries to match every instance declaration against the