logo       

Re: overlapping instances in ghc-6.5: msg#00006

lang.haskell.glasgow.bugs

Subject: Re: overlapping instances in ghc-6.5

The attached 4 files compile with ghc-6.4.1 and fail with
ghc-6.5.20060201 (see below).

Also, if I delete the Int and Integer instances in Common/ATerm/Conversion.hs the error remains the same for ghc-6.5 whereas ghc-6.4.1 correctly complains about
"No instance for (ShATermConvertible Int)
arising from use of `fromShATerm'' at
Common/ATerm/ConvInstances.hs:39:25-36"

(Common.Lib.Graph is basically the same as Data.Graph.Inductive.Tree)

Cheers Christian

ghc --make -no-recomp -fglasgow-exts -fallow-overlapping-instances Common/ATerm/ConvInstances.hs
Chasing modules from: Common/ATerm/ConvInstances.hs
[1 of 4] Compiling Common.ATerm.AbstractSyntax ( Common/ATerm/AbstractSyntax.hs, Common/ATerm/AbstractSyntax.o )
[2 of 4] Compiling Common.ATerm.Conversion ( Common/ATerm/Conversion.hs, Common/ATerm/Conversion.o )
[3 of 4] Compiling Common.Lib.Graph ( Common/Lib/Graph.hs, Common/Lib/Graph.o )
[4 of 4] Compiling Common.ATerm.ConvInstances ( Common/ATerm/ConvInstances.hs, Common/ATerm/ConvInstances.o )

Common/ATerm/ConvInstances.hs:31:0:
Overlapping instances for Typeable (Common.Lib.Graph.Gr a b)
arising from the superclasses of an instance declaration at Common/ATerm/ConvInstances.hs:31:0
Matching instances:
instance (Typeable1 s, Typeable a) => Typeable (s a)
-- Imported from Data.Typeable
instance [overlap ok] (Typeable a, Typeable b) =>
Typeable (Common.Lib.Graph.Gr a b)
-- Defined at Common/ATerm/ConvInstances.hs:26:0
In the instance declaration for `ShATermConvertible (Common.Lib.Graph.Gr a

b)'

Attachment: Common.tgz
Description: GNU Unix tar archive

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise