[GHC] #4485: Unexplained change in type-inference + OverlappingInstances in

GHC cvs-ghc at haskell.org
Thu Nov 11 09:07:36 EST 2010


#4485: Unexplained change in type-inference + OverlappingInstances in
---------------------------------+------------------------------------------
    Reporter:  JeremyShaw        |        Owner:                           
        Type:  bug               |       Status:  new                      
    Priority:  normal            |    Milestone:                           
   Component:  Compiler          |      Version:  7.0.1 RC1                
    Keywords:                    |     Testcase:                           
   Blockedby:                    |   Difficulty:                           
          Os:  Unknown/Multiple  |     Blocking:                           
Architecture:  Unknown/Multiple  |      Failure:  GHC rejects valid program
---------------------------------+------------------------------------------
Changes (by nibro):

 * cc: niklas.broberg@… (added)


Comment:

 The intended intuition is that whenever we come upon an unconstrained use
 of `genElement`, which produces some `XMLGenT m1 (XML m1)` where we can't
 resolve `m1`, but where we are within the context of some `XMLGen m` that
 we're embedding it in, default to `m1` = `m`.

 In other words, I would expect that the third alternative above defaulted
 to whenever we cannot actually infer that `m1` = `Identity`.

 Reading up on the documentation again, maybe this is exactly what
 IncoherentInstances does after all? What worries me is that
 IncoherentInstances might cause the third alternative to be chosen "too
 early", but maybe that's just superstition.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4485#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list