type class problem / GHC bug
Brandon Michael Moore
brandon at its.caltech.edu
Sat Nov 8 05:19:41 EST 2003
Hi everyone
I've built GHC from CVS and I'm getting some odd errors about overlapping
instances. This is different from 6.0.1, but it's not obvious it is wrong,
so I'm probably missing something here.
The example is
class A x
class (A x) => B x
instance A x
instance B x
The new GHC complains that the second instance overlapps with the first.
Maybe because of the context on B x the instance for B x is interpreted as
a claim we have A x too, but shouldn't it be the other way, that you need
an instance A x from somewhere along with an instance for B x?
Also, I tried to update and rebuild, but the makefiles seem to have the
dependencies wrong or something. I compiles THSyntax.hs by hand, then ran
into some trouble with files that needed some modules from GHCI trying
(and dying) to build before the ghci files.Is there a guide to building
GHC from CVS anywhere? I had the same problem with alex, but that's
small enough to build by hand.
Thanks
Brandon
More information about the Haskell
mailing list