From: Matthijs Kooijman Date: Mon, 7 Dec 2009 14:11:04 +0000 (+0100) Subject: Let scrutinee binder removal mark the expression as changed. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;ds=sidebyside;h=ac348492299cb46ea04e15a9cecf01b4c80a3f1c;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Let scrutinee binder removal mark the expression as changed. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index a06094b..f0f2de2 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -402,7 +402,7 @@ scrutbndrremove, scrutbndrremovetop :: Transform -- all occurences of the binder with the scrutinee variable. scrutbndrremove (Case (Var scrut) bndr ty alts) | bndr_used = do alts' <- mapM subs_bndr alts - return $ Case (Var scrut) wild ty alts' + change $ Case (Var scrut) wild ty alts' where is_used (_, _, expr) = expr_uses_binders [bndr] expr bndr_used = or $ map is_used alts