6 Jul 01:02
Re: Definition of hidden instance members (bug in GHC or Hugs+Yhc)
Neil Mitchell <ndmitchell <at> gmail.com>
2008-07-05 23:02:52 GMT
2008-07-05 23:02:52 GMT
> This is either a GHC bug, or a Yhc+Hugs bug - I'm not sure which, but
> the compilers disagree:
>
> import Prelude hiding ((==))
> data Foo = Foo
> instance Eq Foo where
> (==) a b = True
I was thinking that GHC's behaviour seems more sensible, but the
following fails:
import qualified Module as M
instance MClass Foo where
M.foo = undefined
M. is not allowed as a prefix of a function, which makes resolving
ambiguities hard unless the compiler solves the issue for you (as Hugs
and Yhc do)
Thanks
Neil
RSS Feed