diff options
author | simonpj@microsoft.com <unknown> | 2009-10-02 11:14:00 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2009-10-02 11:14:00 +0000 |
commit | 7defebee53964996947d1dee2c6606519d796429 (patch) | |
tree | 0ba71c47c469d5a31c4b34062236f6b2c6cec534 /docs | |
parent | ba55b83612b63b2dad5123d1b58d0f5c4d08ebd5 (diff) | |
download | haskell-7defebee53964996947d1dee2c6606519d796429.tar.gz |
Document -XMonoLocalBinds
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/flags.xml | 7 | ||||
-rw-r--r-- | docs/users_guide/glasgow_exts.xml | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index 182b2fdacb..b87044f5ac 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -757,6 +757,13 @@ <entry><option>-XNoScopedTypeVariables</option></entry> </row> <row> + <entry><option>-XMonoLocalBinds</option></entry> + <entry>Enable <link linkend="mono-local-binds">do not generalise local bindings</link>. + </entry> + <entry>dynamic</entry> + <entry><option>-XNoMonoLocalBinds</option></entry> + </row> + <row> <entry><option>-XTemplateHaskell</option></entry> <entry>Enable <link linkend="template-haskell">Template Haskell</link>. No longer implied by <option>-fglasgow-exts</option>.</entry> diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index fb21918e25..befb416fc7 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -5999,6 +5999,21 @@ pattern binding must have the same context. For example, this is fine: </para> </sect2> +<sect2 id="mono-local-binds"> +<title>Monomorphic local bindings</title> +<para> +We are actively thinking of simplifying GHC's type system, by <emphasis>not generalising local bindings</emphasis>. +The rationale is described in the paper +<ulink url="http://research.microsoft.com/~simonpj/papers/constraints/index.htm">Let should not be generalised</ulink>. +</para> +<para> +The experimental new behaviour is enabled by the flag <option>-XMonoLocalBinds</option>. The effect is +that local (that is, non-top-level) bindings without a type signature are not generalised at all. You can +think of it as an extreme (but much more predictable) version of the Monomorphism Restriction. +If you supply a type signature, then the flag has no effect. +</para> +</sect2> + </sect1> <!-- ==================== End of type system extensions ================= --> |