An ML-style language usually generalises the type of any let-bound or where-bound variable,
...
...
@@ -7288,11 +7290,13 @@ All of this applies only to bindings that lack an explicit type signature, so th
infer its type. If you supply a type signature, then that fixes type of the binding, end of story.
</para><para>
The rationale for this more conservative strategy is given in
<ulinkurl="http://research.microsoft.com/~simonpj/papers/constraints/index.htm">the papers</ulink> "Let should not be generalised" and "Modular type inference with local assumptions".
<ulinkurl="http://research.microsoft.com/~simonpj/papers/constraints/index.htm">the papers</ulink> "Let should not be generalised" and "Modular type inference with local assumptions", and
a related <ulinkurl="http://hackage.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7">blog post</ulink>.
</para><para>
The flag <option>-XMonoLocalBinds</option> is implied by <option>-XTypeFamilies</option> and <option>-XGADTs</option>. You can switch it off again
with <option>-XNoMonoLocalBinds</option> but type inference becomes less predicatable if you do so. (Read the papers!)