Add a coercion optimiser, to reduce the size of coercion terms
authorsimonpj@microsoft.com <unknown>
Mon, 26 Oct 2009 09:47:56 +0000 (09:47 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 26 Oct 2009 09:47:56 +0000 (09:47 +0000)
commit48196c3c2a365ce085d0b0567cbd4ea047af59df
tree2f26784a675e050f7bdebc3990e853c840d89d2b
parent291f2adda098f7e275db3720ed07e7dc77c821c4
Add a coercion optimiser, to reduce the size of coercion terms

Coercion terms can get big (see Trac #2859 for example), so this
patch puts the infrastructure in place to optimise them:

  * Adds Coercion.optCoercion :: Coercion -> Coercion

  * Calls optCoercion in Simplify.lhs

The optimiser doesn't work right at the moment, so it is
commented out, but Tom is going to work on it.
compiler/simplCore/Simplify.lhs
compiler/types/Coercion.lhs