| ... | @@ -73,6 +73,22 @@ There have been 4 other suggestions related to the monomorphism restriction: |
... | @@ -73,6 +73,22 @@ There have been 4 other suggestions related to the monomorphism restriction: |
|
|
>
|
|
>
|
|
|
> Seems against the spirit of Haskell. But see [ Let should not be generalised](http://research.microsoft.com/~simonpj/papers/constraints/index.htm) which argues the case for this approach, at least for nested bindings.
|
|
> Seems against the spirit of Haskell. But see [ Let should not be generalised](http://research.microsoft.com/~simonpj/papers/constraints/index.htm) which argues the case for this approach, at least for nested bindings.
|
|
|
|
|
|
|
|
|
## 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
|
|
## References
|
|
|
|
|
|
|
|
|
|
|
| ... | | ... | |