projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make -fcontext-stack into a dynamic flag
[ghc-hetmet.git]
/
docs
/
users_guide
/
glasgow_exts.xml
diff --git
a/docs/users_guide/glasgow_exts.xml
b/docs/users_guide/glasgow_exts.xml
index
319104e
..
7a918a8
100644
(file)
--- a/
docs/users_guide/glasgow_exts.xml
+++ b/
docs/users_guide/glasgow_exts.xml
@@
-140,7
+140,7
@@
documentation</ulink> describes all the libraries that come with GHC.
<indexterm><primary><option>-fallow-incoherent-instances</option></primary></indexterm>
</term>
<term>
<indexterm><primary><option>-fallow-incoherent-instances</option></primary></indexterm>
</term>
<term>
- <option>-fcontext-stack</option>
+ <option>-fcontext-stack=N</option>
<indexterm><primary><option>-fcontext-stack</option></primary></indexterm>
</term>
<listitem>
<indexterm><primary><option>-fcontext-stack</option></primary></indexterm>
</term>
<listitem>
@@
-617,7
+617,7
@@
clunky env var1 var1 = case lookup env var1 of
Nothing -> fail
Just val2 -> val1 + val2
where
Nothing -> fail
Just val2 -> val1 + val2
where
- fail = val1 + val2
+ fail = var1 + var2
</programlisting>
<para>
</programlisting>
<para>
@@
-2090,7
+2090,7
@@
option</primary></indexterm>, you can use arbitrary
types in both an instance context and instance head. Termination is ensured by having a
fixed-depth recursion stack. If you exceed the stack depth you get a
sort of backtrace, and the opportunity to increase the stack depth
types in both an instance context and instance head. Termination is ensured by having a
fixed-depth recursion stack. If you exceed the stack depth you get a
sort of backtrace, and the opportunity to increase the stack depth
-with <option>-fcontext-stack</option><emphasis>N</emphasis>.
+with <option>-fcontext-stack=</option><emphasis>N</emphasis>.
</para>
</sect3>
</para>
</sect3>
@@
-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>
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
<para>
When GHC tries to resolve, say, the constraint <literal>C Int Bool</literal>,
it tries to match every instance declaration against the
@@
-5378,7
+5380,9
@@
The programmer can specify rewrite rules as part of the source program
(in a pragma). GHC applies these rewrite rules wherever it can, provided (a)
the <option>-O</option> flag (<xref linkend="options-optimise"/>) is on,
and (b) the <option>-frules-off</option> flag
(in a pragma). GHC applies these rewrite rules wherever it can, provided (a)
the <option>-O</option> flag (<xref linkend="options-optimise"/>) is on,
and (b) the <option>-frules-off</option> flag
-(<xref linkend="options-f"/>) is not specified.
+(<xref linkend="options-f"/>) is not specified, and (c) the
+<option>-fglasgow-exts</option> (<xref linkend="options-language"/>)
+flag is active.
</para>
<para>
</para>
<para>