Improve simplification of coercions
authorsimonpj@microsoft.com <unknown>
Mon, 5 Feb 2007 16:33:24 +0000 (16:33 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 5 Feb 2007 16:33:24 +0000 (16:33 +0000)
commit77241a03e4c0c56b35c63a303b96933232ecd083
tree2063b6ef47026aeea4b7e85029a54fe889511415
parenta437c9add13543a5cad7e72df52bd233b6509401
Improve simplification of coercions

At the moment GHC really does very little simplification of coercions.
This patch improves matters, but it's still not great, especially when
you have chains linked together with 'trans'.

I'm also concerned that I have not yet implemented the 'leftc' and 'rightc'
coercions we added to the paper.

But at least things are better than they were.  In particular
g `trans` sym g
now cancels to give the identity.
compiler/types/Coercion.lhs