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).
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.