From: Matthijs Kooijman Date: Wed, 19 Aug 2009 12:35:23 +0000 (+0200) Subject: Make all binders unique before normalizing. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=e3306b891a635b849664657a63eb2ba962ff8d99;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Make all binders unique before normalizing. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 1f5ee42..cce3186 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -693,9 +693,10 @@ normalizeExpr :: -> TranslatorSession CoreSyn.CoreExpr -- ^ The normalized expression normalizeExpr what expr = do + expr_uniqued <- genUniques expr -- Normalize this expression - trace (what ++ " before normalization:\n\n" ++ showSDoc ( ppr expr ) ++ "\n") $ return () - expr' <- dotransforms transforms expr + trace (what ++ " before normalization:\n\n" ++ showSDoc ( ppr expr_uniqued ) ++ "\n") $ return () + expr' <- dotransforms transforms expr_uniqued trace ("\n" ++ what ++ " after normalization:\n\n" ++ showSDoc ( ppr expr')) $ return () return expr'