
#11735: Optimize coercionKind -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): It's nice that `OptCoercion` for `NthCo` gets simpler when we have the role cached.
I allowed a more permissive role in the NthCo
OK, but * I didn't see a change to `mkSubCo` that would take advantage of this (by changing the role rather than wrapping in `SubCo`) * The comment on the constructor `NthCo` should state the invariant. Given `(NthCo r n co)` we require that `lteRole r (nthRole (coercionRole co) n))` or something like that. * Why does't the same flexibility apply for the other coercions that cache roles: `FunCo`, `Refl`, `TyConAppCo`, `UnivCo`? We should state their invariants too... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11735#comment:61 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler