From 1208e784cccf1d2d6d290ec1609a64584e8ed555 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 6 Aug 2009 17:32:25 +0200 Subject: [PATCH] Fix letremoveunused, it removed all used bindings. --- "c\316\273ash/CLasH/Normalize.hs" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index b2b4bd8..90cbbc7 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -170,7 +170,7 @@ letremoveunused expr@(Let (Rec binds) res) = do bound_exprs = map snd binds -- For each bind check if the bind is used by res or any of the bound -- expressions - dobind (bndr, _) = not $ any (expr_uses_binders [bndr]) (res:bound_exprs) + dobind (bndr, _) = any (expr_uses_binders [bndr]) (res:bound_exprs) -- Leave all other expressions unchanged letremoveunused expr = return expr letremoveunusedtop = everywhere ("letremoveunused", letremoveunused) -- 2.30.2