
#9443: Regression from 7.6.3 to 7.8.3: could not coerce because argument "has role Nominal" -------------------------------------+------------------------------------- Reporter: bernalex | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: x86_64 (amd64) Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: rejects valid program | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by haasn): I agree that the class definition you gave should not be allowed. The bug as presented here is a very special case, namely the case where we have: {{{ class C a where meth :: C a => a -> a }}} This constraint is redundant because the context already implies it. So a fix for this issue would ''not'' necessarily imply allowing instance coercions in general - it would only allow instance coercions in the context of an instance coercion for that same instance, which is a rather minor detail. If this can be fixed easily, that's good; but if it can't, I don't think there's much of a loss. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9443#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler