From: Matthijs Kooijman Date: Wed, 19 Aug 2009 12:42:58 +0000 (+0200) Subject: When inlining top level functions, guarantee uniqueness. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=commitdiff_plain;h=4aed809f270a2a01cfaca05381c0689cd881556b When inlining top level functions, guarantee uniqueness. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index cce3186..1f0509d 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -332,8 +332,10 @@ inlinetoplevel expr@(Var f) | not $ isUserDefined f = do -- Get the normalized version norm <- Trans.lift $ getNormalized f if needsInline norm - then - change norm + then do + -- Regenerate all uniques in the to-be-inlined expression + norm_uniqued <- Trans.lift $ genUniques norm + change norm_uniqued else return expr else