Re: Strafunski/overlapping instances in ghc-6.5

2006-04-03 Thread Christian Maeder

Christopher Brown wrote:

Christian,



Did you try the switch -fallow-overlapping-instances when compiling?


Yes, but it doesn't seem to make much difference.


Maybe a couple of more library files have not been translated with the 
above flag.


http://article.gmane.org/gmane.comp.lang.haskell.glasgow.bugs/3625

In fact I became a problem with a Show instance and ghc-6.5.20060211

Christian

OMDoc/HetsDefs.hs:649:0:
Overlapping instances for Show AllMaps
  arising from use of `GHC.Show.$dmshowList' at OMDoc/HetsDefs.hs:649:0
Matching instances:
  instance (Show a, Show b, Show c, Show d, Show e, Show f) =
   Show (a, b, c, d, e, f)
-- Imported from GHC.Show
  instance [overlap ok] Show AllMaps
-- Defined at OMDoc/HetsDefs.hs:649:0
In the expression: GHC.Show.$dmshowList
In the definition of `showList': showList = GHC.Show.$dmshowList
In the definition for method `showList'
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: overlapping instances in ghc-6.5

2006-02-06 Thread Christian Maeder

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)'


Common.tgz
Description: GNU Unix tar archive
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


RE: overlapping instances in ghc-6.5

2006-02-06 Thread Simon Peyton-Jones
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:[EMAIL PROTECTED]
| Sent: 06 February 2006 13:12
| To: Simon Peyton-Jones
| Cc: glasgow-haskell-bugs@haskell.org
| 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)'
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs