Changes between Version 1 and Version 2 of MonomorphicPatternBindings


Ignore:
Timestamp:
Aug 7, 2006 8:13:30 AM (9 years ago)
Author:
simonpj@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MonomorphicPatternBindings

    v1 v2  
     1== Make pattern bindings monomorphic ==
     2
    13Proposal: make all pattern bindings completely monomorphic (regardless of type signatures)
    24
     
    1416        case e of (f,g) -> ...
    1517}}}
    16 I've been meaning to give GHC a flag to give it this behaviour, so that I can see if any Haskell programs break.  My bet is that this is a feature that is tricky to implement, but which is virtually never used.  Removing it would simplify the language.
     18== Experiment ==
     19
     20In July I changed GHC (the HEAD) to make pattern bindings monomorphic by default.  (A binding of a simple variable is not considered to be a pattern binding.)  The flag {{{-fno-mono-pat-binds}}} restores the standard behaviour.
     21
     22The interesting observation is this: all of the libraries compile without a tremor, and I have received no mail whatsoever complaining about the new behaviuor.  I deliberated made the new behaviour the default so that I'd hear of any breakaga.
     23
     24My conclusion: polymorphic pattern bindings is a feature that is virtually never used.  We should nuke them.
     25