
#9123: Need for higher kinded roles -------------------------------------+------------------------------------ Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by goldfire): Now, the question is whether we can derive `Coercible (s -> p a s) (s -> p b s)` from `(Rep p, Coercible a b)`, right? Once again, we assume that the only way we can use `Rep` is the rule (*) in comment:15. 1. Decompose `(->)` to get that we need to show `Coercible (p a s) (p b s)`. 2. Use the eta rule requested at the top of #9117 to reduce the goal to `Coercible (p a) (p b)`. 3. Use rule (*) to reduce the goal to `(Rep p, Coercible a b)`. 4. We are done by assumption. This was indeed somewhat harder than the derivation in comment:15 in that it requires the constraint solver to do something it currently cannot (the eta reduction in #9117), but it still doesn't require an asymmetrical rule for `Rep`. Note that the eta rule is easily expressible in Core -- it's just that the constraint solver doesn't know to use it. Does this address your concern, Edward? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9123#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler