[GHC] #11735: Optimize coercionKind
GHC
ghc-devs at haskell.org
Thu Jan 25 17:36:53 UTC 2018
#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 goldfire):
I still say that most uses of `mkNthCo` already know the right role --
though perhaps this role may not be as obvious to someone who isn't me.
Just supplying the role would be much better than computing it, of course.
I don't agree with Simon's suggestion about `mkNthCoDirect` -- this is a
first step toward invariants that are not upheld. Instead, I would have
`mkNthCo` require a role and make a new `mkNthCoNoRole` that computes it.
The naming of the functions should discourage the use of the second.
The Note explaining why I originally bundled `coercionKind` and
`coercionRole` points to a test case. Does that give a concrete testing
ground? You might also look in the git history around that note to see if
that gives you any pointers.
Agreed about not cluttering `IfaceCoercion`.
And, yes, I will take a look at `simplCast` tomorrow. (Though it's deeply
scary when Simon says "My brain melted" and then asks me to take a look!)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11735#comment:29>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list