NoMonomorphismRestriction

Simon Peyton-Jones simonpj at microsoft.com
Fri Aug 7 13:04:05 EDT 2009


| . Understanding how to respond to type inference and error messages is
| hard enough without having additional differences in innocent-looking
| code.  Do you think my hope is reasonable that not-generalizing could
| lead to better error messages? 

I don't think it's obvious one way or the other. We'll have to see.

| typechecker behaviors to think about.  I guess it's still possible to
| use explicit type-signatures to make let-bindings polymorphic,

Yes, just so

| in a way
| that is difficult or impossible for lambda or case? (I guess for lambda,
| it would require making the lambda into a rank-2 function, though I'm
| not sure how to do that syntactically.)

Easy:  \(x :: forall a. a->a) -> blah

Simon



More information about the Haskell-prime mailing list