In mkCast (Coercion c1) c2, check that c2 has (~#) on both sides
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 9 Jan 2012 14:06:25 +0000 (14:06 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 9 Jan 2012 14:06:25 +0000 (14:06 +0000)
commita0f8b3acec4af74be47808b30365aac85721e84c
tree7b189f5872aea09b27e373623cd213a9ca217880
parent6a9e521713cb4cbc3c49fa861aa936730c346e5e
In mkCast (Coercion c1) c2, check that c2 has (~#) on both sides

Otherwise the RHS is utterly bogus.  I also added some asserts.
Thanks to Max for pointing this out.
compiler/coreSyn/CoreUtils.lhs
compiler/simplCore/Simplify.lhs
compiler/types/Coercion.lhs