MonoLocalBinds and darcs

Simon Peyton-Jones simonpj at microsoft.com
Thu Nov 4 04:42:29 EDT 2010


|  > Well, I'm aware that it's a compromise.  I don't know how to do a bang-up principled
|  job of typechecking local polymorphism, so GHC does a best-effort job.  In fact best
|  effort is pretty good, and it's not hard to implement, so
|  > 	a) I don't expect to remove NoLocalMonoBinds
|  > 	b) I expect it will work fine 99% of the time
|  
|  What happens in the other 1%? Does the program just get rejected for no
|  apparent reason, or can more nefarious things happen

In the 1% case I fear that an apparently-innocuous change to the program would make it change from rejected to accepted or vice versa.  Or, to put it another way, the same program compiled with one Haskell compiler is accepted, but is rejected by another Haskell compiler.  The realist says "who cares, I only use GHC".  But I find that un-satisfying. There should be a good definition of what is a Haskell program and what isn't.  "Whatever GHC accepts" isn't a good answer.  But that's as nefarious as it gets

Simon


More information about the Glasgow-haskell-users mailing list