From: Matthijs Kooijman Date: Wed, 31 Mar 2010 14:44:47 +0000 (+0200) Subject: Slightly move the "after normalization" debug output. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=a0a8d87f198400f7d608a3dcb572228020a536a8;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Slightly move the "after normalization" debug output. This should ensure it is always printed. Previously, it seems it was printed only when the final state from the monad was accessed, not when the value was used (which caused problems if the value caused an error further on). --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 2b5c899..a550124 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -856,9 +856,9 @@ normalizeExpr what expr = do trace (what ++ " before normalization:\n\n" ++ showSDoc ( ppr expr_uniqued ) ++ "\n") $ return () expr' <- dotransforms transforms expr_uniqued endcount <- MonadState.get tsTransformCounter - trace ("\n" ++ what ++ " after normalization:\n\n" ++ showSDoc ( ppr expr')) $ return () - trace ("\nNeeded " ++ show (endcount - startcount) ++ " transformations to normalize " ++ what) $ return () - return expr' + trace ("\n" ++ what ++ " after normalization:\n\n" ++ showSDoc ( ppr expr') + ++ "\nNeeded " ++ show (endcount - startcount) ++ " transformations to normalize " ++ what) $ + return expr' -- | Split a normalized expression into the argument binders, top level -- bindings and the result binder.