Serge
Good news: I have cured the massive code-explosion problem you encountered with
GHC 6.8. I'm about to commit a patch for that, so it'll be in GHC 6.10.
However, I'm now getting a complaint about overlapping instances (DoCon 2.11).
GHC 6.10 is being a bit more consistent about coherence. Here is one example:
Fraction.hs:124:48:
Overlapping instances for MulSemigroup (Fraction a)
arising from a use of `inv' at Fraction.hs:124:48-57
Matching instances:
instance [overlap ok] (GCDRing a) => MulSemigroup (Fraction a)
-- Defined at Fract_.hs:438:9-46
instance [overlap ok] MulSemigroup (Fraction Integer)
-- Defined at Fraction.hs:260:9-39
(The choice depends on the instantiation of `a'
To pick the first instance above, use -XIncoherentInstances
when compiling the other instance declarations)
It's absolutely right! If you wanted the instance for (MulSemigroup (Fraction
Integer)), then the call to inv could in principle use MulSemigroup (Fraction
Integer) instance, and give different behaviour. (See the user manual stuff
about incoherent-instances.)
Possible solutions:
a) add -XAllowIncoherentInstances
b) make the instance declaration look like
instance (MulSemigroup (Fraction a), GCDRing a) => LinSolvRing
(Fraction a)
thereby deferring the choice
Anyway, this is to alert you to this upcoming question.
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc