[commit: ghc] supercompiler: Tweak debug output (2addd84)

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/2addd844b26cd49214954daf06b423c1185af35b

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

commit 2addd844b26cd49214954daf06b423c1185af35b
Author: Max Bolingbroke <[email protected]>
Date:   Wed Sep 26 20:06:08 2012 +0100

    Tweak debug output

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

 .../supercompile/Supercompile/Drive/Process3.hs    |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Drive/Process3.hs b/compiler/supercompile/Supercompile/Drive/Process3.hs
index 5f75203..7427aec 100644
--- a/compiler/supercompile/Supercompile/Drive/Process3.hs
+++ b/compiler/supercompile/Supercompile/Drive/Process3.hs
@@ -342,7 +342,7 @@ tryMSG opt = bothWays $ \shallow_state state -> do
     instanceSplit opt (deeds' `plusDeeds` deeds_r', Heap (h_r `M.union` h_hs) ids_r, k_r, e')
 
 pprMSGResult :: MSGResult -> SDoc
-pprMSGResult (Pair (deeds_l, heap_l@(Heap h_l ids_l), rn_l, k_l) (deeds_r, heap_r@(Heap h_r ids_r), rn_r, k_r), (heap@(Heap _ ids), k, qa))
+pprMSGResult (Pair (deeds_l, heap_l, _rn_l, k_l) (deeds_r, heap_r, _rn_r, k_r), (heap, k, qa))
   = pPrintFullState quietStatePrettiness (emptyDeeds, heap, k, qa) $$
     pPrintFullState quietStatePrettiness (deeds_l, heap_l, k_l, fmap Question (annedVar (mkTag 0) nullAddrId)) $$
     pPrintFullState quietStatePrettiness (deeds_r, heap_r, k_r, fmap Question (annedVar (mkTag 0) nullAddrId))
@@ -557,7 +557,14 @@ memo opt init_state = {-# SCC "memo'" #-} memo_opt init_state
                                 ; fulfillM res }, s { scpMemoState = ms' })
               where (ms', p) = promise (scpMemoState s) (state, reduced_state)
         in case fmap (\(exact, ((p, is_ancestor), mr)) -> case mr of
-                       RightIsInstance (Heap h_inst ids_inst) rn_lr k_inst -> (exact, do { traceRenderM ("=sc" ++ if exact then "" else "(inst)") (fun p, PrettyDoc (pPrintFullState quietStatePrettiness state), PrettyDoc (pPrintFullState quietStatePrettiness reduced_state), PrettyDoc (pPrintFullState quietStatePrettiness (meaning p)) {-, res-})
+                       RightIsInstance (Heap h_inst ids_inst) rn_lr k_inst -> (exact, do { traceRenderM ("=sc" ++ if exact then "" else "(inst)")
+                                                                                                        (fun p
+                                                                                                        , PrettyDoc (pPrintFullState quietStatePrettiness state)
+                                                                                                        --, PrettyDoc (pPrintFullState quietStatePrettiness reduced_state)
+                                                                                                        , PrettyDoc (pPrintFullState quietStatePrettiness (meaning p))
+                                                                                                        --, case msgMaybe (MSGMode { msgCommonHeapVars = emptyInScopeSet }) (meaning p) reduced_state of Just result -> PrettyDoc (pprMSGResult result)
+                                                                                                        --, res
+                                                                                                        )
                                                                                          ; stuff <- instanceSplit memo_opt (remaining_deeds, Heap (foldr (\x -> M.insert x lambdaBound) h_inst (fun p:varSetElems extraOutputFvs)) ids_inst, k_inst, applyAbsVars (fun p) (Just rn_lr) (abstracted p))
                                                                                          ; insertTagsM stuff })
                          where
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.