Two improvements to optCoercion
authorsimonpj@microsoft.com <unknown>
Wed, 16 Dec 2009 08:47:06 +0000 (08:47 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 16 Dec 2009 08:47:06 +0000 (08:47 +0000)
commit064812423073e89805c16311728cfded5d50e306
treee38fb4d7a95eb06abb01351d551dbd4683db846a
parent455302c1fd5dba0047e76ad83ec21d2edb9864de
Two improvements to optCoercion

* Fix a bug that meant that
     (right (inst (forall tv.co) ty))
  wasn't getting optimised.  This showed up in the
  compiled code for ByteCodeItbls

* Add a substitution to optCoercion, so that it simultaneously
  substitutes and optimises.  Both call sites wanted this, and
  optCoercion itself can use it, so it seems a win all round.
compiler/coreSyn/CoreSubst.lhs
compiler/simplCore/SimplEnv.lhs
compiler/simplCore/Simplify.lhs
compiler/types/Coercion.lhs
compiler/types/Type.lhs