| ... | ... | @@ -99,6 +99,26 @@ There have been 4 other suggestions related to the monomorphism restriction: |
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
## Opposition
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In the discussion on the mailing list, Simon Peyton Jones wrote:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As many of you will know I am now leaning
|
|
|
|
strongly towards doing no generalisation whatsoever on nested bindings. See
|
|
|
|
[ http://research.microsoft.com/\~simonpj/papers/constraints/index.htm](http://research.microsoft.com/~simonpj/papers/constraints/index.htm)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
So I'd cut the cake differently:
|
|
|
|
|
|
|
|
|
|
|
|
- top level: generalise, no monomorphism restriction
|
|
|
|
- nested: do not generalise, monomorphism restriction for every binding
|
|
|
|
|
|
|
|
## References
|
|
|
|
|
|
|
|
|
| ... | ... | |