... | ... | @@ -58,6 +58,38 @@ See [ John Hughes' proposal](http://www.haskell.org//pipermail/haskell-prime/200 |
|
|
- The reason for having two kinds of binding is subtle and hard to explain to newcomers.
|
|
|
- Still a wart, but an even more visible one.
|
|
|
|
|
|
## A monomorphic binding syntax
|
|
|
|
|
|
|
|
|
|
|
|
behave just like the monomorhpic binding operator, but instead of having a new
|
|
|
operator, use parens as in:
|
|
|
|
|
|
|
|
|
```wiki
|
|
|
(shared) = 3 + 4 -- monomorphic binding
|
|
|
```
|
|
|
|
|
|
|
|
|
see [ http://www.haskell.org//pipermail/haskell-prime/2006-January/000117.html](http://www.haskell.org//pipermail/haskell-prime/2006-January/000117.html)
|
|
|
|
|
|
|
|
|
|
|
|
**For:**
|
|
|
|
|
|
|
|
|
- Simpler and more consistent than the M-R
|
|
|
- doesn't eat up a new operator
|
|
|
- can be seen as a degenerate case of the standard 'pattern matching is monomorphic' rule
|
|
|
- syntax makes it clear this is something that can happen to values and not functions
|
|
|
- we are already used to (=) being overloaded in this way
|
|
|
|
|
|
|
|
|
**Against:**
|
|
|
|
|
|
|
|
|
- same as above
|
|
|
|
|
|
## All variable/pattern bindings are monomorphic unless a signature is given
|
|
|
|
|
|
|
... | ... | |