strange behavior of let in ghci

Brent Yorgey byorgey at seas.upenn.edu
Fri Jan 20 20:26:25 CET 2012


On Thu, Jan 19, 2012 at 11:10:09PM -0600, Antoine Latter wrote:
> On Thu, Jan 19, 2012 at 10:55 PM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:
> > Hello,
> >
> > I met strange behavior of let in ghci 7.0.4. The following works well.
> >
> 
> You're running into the monomorphism restriction:
> http://www.haskell.org/haskellwiki/Monomorphism_restriction

To be more precise, it's the monomorphism restriction combined with
ghci's extended type-defaulting rules:

http://www.haskell.org/ghc/docs/7.2.2/html/users_guide/interactive-evaluation.html#extended-default-rules

-Brent



More information about the Glasgow-haskell-users mailing list