[Haskell-cafe]  == 
pkeir at dcs.gla.ac.uk
Fri May 29 06:29:29 EDT 2009
f''' = (::[()]) == (::[()])
So why doesn't ghc have 'default' instances?
From: Eugene Kirpichov [mailto:ekirpichov at gmail.com]
Sent: Fri 29/05/2009 10:51
To: Paul Keir
Cc: haskell-cafe at haskell.org
Subject: Re: [Haskell-cafe]  == [MESSAGE NOT SCANNED]
2009/5/29 Paul Keir <pkeir at dcs.gla.ac.uk>:
> Hi all,
> GHC is not happy with this:
> f =  == 
This fails because GHC doesn't know which 'a' you mean, and can't
choose an Eq instance.
> nor this:
> f' = (::(Eq a) => [a]) == (::(Eq a) => [a])
This fails for the same reason.
> but this is OK:
> f'' = (::[Integer]) == (::[Integer])
> GHCI is comfortable with  == , so why not GHC? 'Just curious.
Because GHCI has some 'default' instances, whereas GHC doesn't. This
time, it probably chooses a=().
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
Web IR developer, market.yandex.ru
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe