Changes between Initial Version and Version 1 of MonomorphismRestriction/MonomorphicBindingSyntax


Ignore:
Timestamp:
May 14, 2008 3:03:59 PM (7 years ago)
Author:
simonmar@…
Comment:

text moved from MonmorphismRestriction?

Legend:

Unmodified
Added
Removed
Modified
  • MonomorphismRestriction/MonomorphicBindingSyntax

    v1 v1  
     1= A monomorphic binding syntax =
     2
     3behave just like the monomorhpic binding operator, but instead of having a new
     4operator, use parens as in:
     5
     6{{{
     7(shared) = 3 + 4    -- monomorphic binding
     8}}}
     9
     10see http://www.haskell.org//pipermail/haskell-prime/2006-January/000117.html
     11
     12'''For:'''
     13 * Simpler and more consistent than the M-R
     14 * doesn't eat up a new operator
     15 * can be seen as a degenerate case of the standard 'pattern matching is monomorphic' rule
     16 * syntax makes it clear this is something that can happen to values and not functions
     17 * we are already used to (=) being overloaded in this way
     18
     19'''Against:'''
     20 * would make parentheses matter in a certain situation (n+k patterns and negative literals already do this)
     21