[commit: ghc] supercompiler: Tracing logic for reduce-stop fiddle (bb3a0cb)
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 : supercompiler http://hackage.haskell.org/trac/ghc/changeset/bb3a0cbe890cecbdbdbe2dd241e2543d2103b294 >--------------------------------------------------------------- commit bb3a0cbe890cecbdbdbe2dd241e2543d2103b294 Author: Max Bolingbroke <[email protected]> Date: Thu Aug 4 19:36:25 2011 +0100 Tracing logic for reduce-stop fiddle >--------------------------------------------------------------- .../supercompile/Supercompile/Drive/Process.hs | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/compiler/supercompile/Supercompile/Drive/Process.hs b/compiler/supercompile/Supercompile/Drive/Process.hs index 82afb9e..5b1f451 100644 --- a/compiler/supercompile/Supercompile/Drive/Process.hs +++ b/compiler/supercompile/Supercompile/Drive/Process.hs @@ -283,7 +283,10 @@ reduce orig_state = go (mkHistory rEDUCE_WQO) orig_state Nothing -> (mempty, state) Just state' -> case terminate hist state of Continue hist' -> go hist' state' - Stop old_state -> trace "reduce-stop" $ (mempty { stat_reduce_stops = 1 }, if rEDUCE_ROLLBACK then old_state else state') -- TODO: generalise? + Stop old_state -> pprTrace "reduce-stop" (pPrintFullState old_state $$ pPrintFullState state) + -- let smmrse s@(_, _, _, qa) = pPrintFullState s $$ case annee qa of Question _ -> text "Question"; Answer _ -> text "Answer" in + -- pprPreview2 "reduce-stop" (smmrse old_state) (smmrse state) $ + (mempty { stat_reduce_stops = 1 }, if rEDUCE_ROLLBACK then old_state else state') -- TODO: generalise? --