- = wwBind bind `thenUs` \ intermediate_bind ->
- wwExpr expr `thenUs` \ new_expr ->
- returnUs (mkLets intermediate_bind new_expr)
-
-wwExpr (Case expr binder ty alts)
- = wwExpr expr `thenUs` \ new_expr ->
- mapUs ww_alt alts `thenUs` \ new_alts ->
- returnUs (Case new_expr binder ty new_alts)
+ = mkLets <$> wwBind bind <*> wwExpr expr
+
+wwExpr (Case expr binder ty alts) = do
+ new_expr <- wwExpr expr
+ new_alts <- mapM ww_alt alts
+ return (Case new_expr binder ty new_alts)