id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
7296,ghc-7 assumes incoherent instances without requiring language `IncoherentInstances`,maeder,simonpj,"the attached examples works with ghc-7 and returns

{{{
    *Main> a
    [Spec1 Spec2]
    *Main> b
    []
}}}

(One may wish that b also returned [Spec1 Spec2])

ghc-6 complains with

{{{
Splittable.hs:16:36:
    Overlapping instances for Test a Spec2
      arising from a use of `test' at Splittable.hs:16:36-43
    Matching instances:
      instance [overlap ok] Test a Spec2
        -- Defined at Splittable.hs:20:13-24
      instance [overlap ok] Test Bool Spec2
        -- Defined at Splittable.hs:25:13-27
    (The choice depends on the instantiation of `a'
     To pick the first instance above, use -XIncoherentInstances
     when compiling the other instance declarations)
    In the second argument of `($)', namely `test a b'
    In the expression: map Spec1 $ test a b
    In the definition of `test':
        test a (Spec1 b) = map Spec1 $ test a b
Failed, modules loaded: none.
}}}

After adding `IncoherentInstances` the file also goes through ghc-6 with the same results.
",bug,new,normal,7.8.1,Compiler (Type checker),7.6.1,,,sternkinder@…,Unknown/Multiple,Unknown/Multiple,GHC accepts invalid program,Unknown,,,,
