[commit: ghc] : Improve assertion formatting in step' (3774d47)

Max Bolingbroke <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : 

http://hackage.haskell.org/trac/ghc/changeset/3774d4751dca50b4f7a833d2556bbe80feb3daf2

>---------------------------------------------------------------

commit 3774d4751dca50b4f7a833d2556bbe80feb3daf2
Author: Max Bolingbroke <[email protected]>
Date:   Wed Jul 27 22:39:47 2011 +0100

    Improve assertion formatting in step'

>---------------------------------------------------------------

 .../Supercompile/Evaluator/Evaluate.hs             |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs b/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
index 77c8301..8ba977c 100644
--- a/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
+++ b/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
@@ -80,7 +80,8 @@ step' normalising state =
     (\res@(_reduced, stepped_state) -> ASSERT2(noChange (releaseUnnormalisedStateDeed state) (releaseStateDeed stepped_state),
                                                hang (text "step': deeds lost or gained:") 2 (pPrintFullUnnormalisedState state $$ pPrintFullState stepped_state))
                                        ASSERT2(subVarSet (stateFreeVars stepped_state) (unnormalisedStateFreeVars state),
-                                               text "step': FVs" $$ pPrint (unnormalisedStateFreeVars state) $$ pPrintFullUnnormalisedState state $$ pPrint (stateFreeVars stepped_state) $$ pPrintFullState stepped_state)
+                                               text "step': FVs" $$ hang (text "Before:") 2 (pPrint (unnormalisedStateFreeVars state) $$ pPrintFullUnnormalisedState state) $$
+                                                                    hang (text "After:")  2 (pPrint (stateFreeVars stepped_state) $$ pPrintFullState stepped_state))
                                        -- traceRender (text "normalising" $$ nest 2 (pPrintFullUnnormalisedState state) $$ text "to" $$ nest 2 (pPrintFullState stepped_state)) $
                                        res) $
     go state
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.