[GHC] #5960: Show instance for Digraph.Forest overlaps with Show [a]
GHC
cvs-ghc at haskell.org
Fri Mar 23 11:09:18 CET 2012
#5960: Show instance for Digraph.Forest overlaps with Show [a]
------------------------------+---------------------------------------------
Reporter: SimonHengel | Owner:
Type: bug | Status: new
Priority: normal | Component: GHC API
Version: 7.4.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
Steps to reproduce:
{{{
module Foo where
import Digraph ()
newtype MyList a = MyList [a]
deriving Show
}}}
{{{
$ ghci -packageghc Foo.hs
Foo.hs:6:12:
Overlapping instances for Show [a]
arising from the 'deriving' clause of a data type declaration
Matching instances:
instance Show a => Show [a] -- Defined in `GHC.Show'
instance Show a => Show (Digraph.Forest a) -- Defined in `Digraph'
(The choice depends on the instantiation of `a'
To pick the first instance above, use -XIncoherentInstances
when compiling the other instance declarations)
When deriving the instance for (Show (MyList a))
Failed, modules loaded: none.
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5960>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list