#2859: Reduce coercion terms to normal form
-------------------------------------------+--------------------------------
Reporter: simonpj | Owner:
Type: compile-time performance bug | Status: new
Priority: normal | Milestone: 6.12 branch
Component: Compiler | Version: 6.10.1
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-------------------------------------------+--------------------------------
Sometimes coercion terms in a Core program grow absurdly big, and can
readily be simplified to be much more compact. Example:
* #2627
* #2440
Big coercion terms have no runtime impact, but they may make compilation
slower.
I speculate that it should be possible to use transformations such as
those Max suggests in his comment on #2440, as a confluent, terminating
rewriting system that makes coercion terms smaller, or, better still,
rewrites them to a normal form. Then we can use "smart constructors" for
coercion terms, so that they are always kept in normal form.
Identity coercions occur a lot, but are not so easy to recognise. I've
also wondered about having some special representation for the identity.
This ticket is to remind us to look for such a rewrite system. Max,
perhaps?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2859>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs