[Haskell-cafe] Ambiguous type variable ‘f0’ arising from a use of ‘f’

Richard Eisenberg eir at cis.upenn.edu
Sun Mar 20 21:36:42 UTC 2016


On Mar 20, 2016, at 4:33 PM, Tom Ellis <tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> wrote:

> According to Travis the old program compiled on 7.8 and 7.10.  It certainly
> compiled on 7.6 on my local machine.  When was the change that made it break
> introduced (and what was that change exactly)?

The change was for 8.0, as part of the redesign of part of the typechecker to support TypeApplications. The change in behavior that you're seeing here was not intentional, but was just a side effect of the redesign. It was originally reported as a regression, but I'm pretty sure that your original program should have been rejected, according to my understanding of how the monomorphism restriction works.

Richard


More information about the Haskell-Cafe mailing list