id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
6002,"GHC 7.4+ thinks class instance is incoherent, 7.0.4 disagrees",heisenbug,,"Load this file into GHCi:
http://omega.googlecode.com/svn/mosaic/TypeMachinery.lhs?r=1086
With v7.4 (and HEAD) I get:
{{{
GHCi, version 7.5.20120410: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling TypeMachinery ( TypeMachinery.lhs, interpreted )
TypeMachinery.lhs:78:23:
Overlapping instances for Show (Nat' (Plus n n1))
arising from a use of `Hide'
Matching instances:
instance Show (Nat' a) -- Defined at TypeMachinery.lhs:24:3
There exists a (perhaps superclass) match:
from the context (Show (Nat' n))
bound by a pattern with constructor
Hide :: forall (a :: * -> *) n. Show (a n) => a n -> Hidden a,
in an equation for `+'
at TypeMachinery.lhs:78:5-10
or from (Show (Nat' n1))
bound by a pattern with constructor
Hide :: forall (a :: * -> *) n. Show (a n) => a n -> Hidden a,
in an equation for `+'
at TypeMachinery.lhs:78:14-19
(The choice depends on the instantiation of `n, n1'
To pick the first instance above, use -XIncoherentInstances
when compiling the other instance declarations)
In the expression: Hide
In the expression: Hide $ plus a b
In an equation for `+': (Hide a) + (Hide b) = Hide $ plus a b
Failed, modules loaded: none.
}}}
With 7.0.4 all compiles (and runs) correctly.",bug,closed,normal,,Compiler,7.4.1,fixed,,,Unknown/Multiple,Unknown/Multiple,GHC rejects valid program,Unknown,polykinds/T6002,,,