From a0a8d87f198400f7d608a3dcb572228020a536a8 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 31 Mar 2010 16:44:47 +0200 Subject: [PATCH] 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). --- "c\316\273ash/CLasH/Normalize.hs" | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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. -- 2.30.2