X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FNormalize.hs;h=90cbbc70aad1b52730746facd4c7500e0ef3cba5;hb=655444253776431f0949cafce2b991d12613fe04;hp=647bd1902592c46db67c132a9ff744901a82b971;hpb=14c4b2bf87d936f2123c237a26503011ccace963;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 647bd19..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) @@ -522,7 +522,7 @@ normalizeExpr what expr = do -- Normalize this expression trace ("Transforming " ++ what ++ "\nBefore:\n\n" ++ showSDoc ( ppr expr' ) ++ "\n") $ return () expr'' <- dotransforms transforms expr' - trace ("\nAfter:\n\n" ++ showSDoc ( ppr expr')) $ return () + trace ("\nAfter:\n\n" ++ showSDoc ( ppr expr'')) $ return () return expr'' -- | Get the value that is bound to the given binder at top level. Fails when