[Haskell-beginners] Is this a GHC bug? Problem inferring type

Brandon Allbery allbery.b at gmail.com
Sun Jun 9 15:45:09 CEST 2013


On Sat, Jun 8, 2013 at 8:16 PM, Peter Hall <peter.hall at memorphic.com> wrote:

> Most recent spec was Haskell 2010, as pointed out by someone else. There
>> is some talk of pushing for a 2014 revision which would include (among
>> other things) removal of the monomorphism restriction — but the standards
>> committee is notoriously conservative, and IIRC argued against that
>> proposal in 2010.
>>
>
> But there has a been a lot of momentum in recent years towards removing
> it. Aren't we a little optimistic? Presumably the only objection is the
> feeling that it raises the barrier of difficulty for new implementations?
>

No. The original reason for it is that one typically gives a constant
applicative form (a binding without a function arrow; informally, a
"value") a name so that it can be shared — but a polymorphic value cannot
be shared. (See, for example, the various tricks for memoizing the
Fibonacci series; these rely on the list being shared, both in its own
definition and when it is used.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130609/fa04cea9/attachment.htm>


More information about the Beginners mailing list