
#10698: Forall'd variable ‘$rcobox’ is not bound in RULE lhs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by nomeata): Hmm, guess I was misguided here. Of course, `Map`’s first argument is set by the user to have role Nominal. For some reason I assumed that, as long as the constructors are in scope, I can still coerce it. But that’s not the way we went. So the whole rule is unfortunately not possible. Anyways, ghc-7.8 has a proper error message, instead of a weird warning: {{{ T10698.hs:19:53: Could not coerce from ‘Map k1 a’ to ‘Map k2 a’ because the first type argument of ‘Map’ has role Nominal, but the arguments ‘k1’ and ‘k2’ differ arising from a use of ‘coerce’ from the context (Coercible k1 k2) bound by the RULE "mapKeysMonotonic/coerce" at T10698.hs:19:1-58 In the expression: coerce When checking the transformation rule "mapKeysMonotonic/coerce" }}} so the bug is about the regression of the error message. Will commit a test case right away. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10698#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler