> You can always use 'case' instead of 'let' for variable bindings.
Except, of course, for top level bindings which is where the
monomorphism restriction is usually most noticable.
> I would remove the monomorphism restriction, [...]
This seems to be a pretty common sentiment but
I don't see anyone pointing out that the
monomorphism restriction is there for _two_ reasons:
1) The performance issues that are currently getting all the attention.
2) Preventing ambiguity in examples like:
[(n,s)] = reads t
where the value of "s" (whose type is String) is determined by the
type of "n".
This example comes from the H'98 report, section 4.5.5 "The Monomorphism
Restriction".
Unless I missed something, reason (2) prevents us from completely
getting rid of the restriction even if we are willing to ignore (1).
(Though if our only goal was to solve (2), it may be that the rule
could be a lot less restrictive.)
--
Alastair Reid
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
- Re: Implict parameters and monomorphism Lennart Augustsson
- Re: Implict parameters and monomorphism Marcin 'Qrczak' Kowalczyk
- Re: Implict parameters and monomorphism Lennart Augustsson
- Re: Implict parameters and monomorphism Andreas Rossberg
- Re: Implict parameters and monomorphism C.Reinke
- Re: Implict parameters and monomorphism Marcin 'Qrczak' Kowalczyk
- Re: Implict parameters and monomorphism C.Reinke
- Re: Implict parameters and monomorphism Lennart Augustsson
- Re: Implict parameters and monomorphism Marcin 'Qrczak' Kowalczyk
- Re: Implict parameters and monomorphism Alastair Reid
- Re: Implict parameters and monomorphism Marcin 'Qrczak' Kowalczyk
- Re: Implict parameters and monomorphism John Launchbury
- Re: Implict parameters and monomorphism John Hughes
- Re: Implict parameters and monomorphism Marcin 'Qrczak' Kowalczyk
- RE: Implict parameters and monomorphism Simon Peyton-Jones
- Re: Implict parameters and monomorphism Mieszko Lis
- Re: Implict parameters and monomorphism John Meacham
- Re: Implict parameters and monomorphism Marcin 'Qrczak' Kowalczyk
- Re: Implict parameters and monomorphism Fergus Henderson
