Version 1 (modified by simonmar@…, 8 years ago) (diff)

text moved from MonmorphismRestriction?

A monomorphic binding syntax

behave just like the monomorhpic binding operator, but instead of having a new operator, use parens as in:

(shared) = 3 + 4    -- monomorphic binding



  • 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


  • would make parentheses matter in a certain situation (n+k patterns and negative literals already do this)