|
RE: overlapping instances in ghc-6.5: msg#00007lang.haskell.glasgow.bugs
OK now I understand. For some time, GHC has made -fallow-overlapping-instances "sticky": any instance in a module compiled with -fallow-overlapping-instances can overlap when imported, regardless of whether the importing module allows overlap. (If there is an overlap, both instances must come from modules thus compiled.) The trouble is that Data.Typeable wasn't being compiled with -fallow-overlapping-instances. I've committed a fix that makes it so. Simon | -----Original Message----- | From: Christian Maeder [mailto:maeder@xxxxxx] | Sent: 06 February 2006 13:12 | To: Simon Peyton-Jones | Cc: glasgow-haskell-bugs@xxxxxxxxxxx | 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)'
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: overlapping instances in ghc-6.5, Christian Maeder |
|---|---|
| Next by Date: | Re: [GHC] #681: non-terminating instances involving FDs, GHC |
| Previous by Thread: | Re: overlapping instances in ghc-6.5, Christian Maeder |
| Next by Thread: | Re: [GHC] #679: using ReadWriteMode in Windows corrupts files, GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |