)
import UniqSupply ( UniqSupply, initUs_, returnUs, thenUs, mapUs, getUniqueUs, UniqSM )
import Unique ( hasKey )
-import BasicTypes ( RecFlag(..), isNonRec, Activation(..) )
+import BasicTypes ( RecFlag(..), isNonRec )
import VarEnv ( isEmptyVarEnv )
import Maybes ( orElse )
import DynFlags
= wwExpr expr `thenUs` \ new_expr ->
returnUs (Note note new_expr)
+wwExpr (Cast expr co)
+ = wwExpr expr `thenUs` \ new_expr ->
+ returnUs (Cast new_expr co)
+
wwExpr (Let bind expr)
= wwBind bind `thenUs` \ intermediate_bind ->
wwExpr expr `thenUs` \ new_expr ->
Now simplifier will transform to
case x-rhs of
- I# a -> let x* = I# b
+ I# a -> let x* = I# a
in body
which is what we want. Now suppose x-rhs is itself a case: