projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ae460dc
)
:step does not delete the :history anymore, and now it logs like :trace
author
Pepe Iborra
<mnislaih@gmail.com>
Thu, 9 Aug 2007 20:11:21 +0000
(20:11 +0000)
committer
Pepe Iborra
<mnislaih@gmail.com>
Thu, 9 Aug 2007 20:11:21 +0000
(20:11 +0000)
compiler/main/InteractiveEval.hs
patch
|
blob
|
history
diff --git
a/compiler/main/InteractiveEval.hs
b/compiler/main/InteractiveEval.hs
index
42b787a
..
1859582
100644
(file)
--- a/
compiler/main/InteractiveEval.hs
+++ b/
compiler/main/InteractiveEval.hs
@@
-358,7
+358,7
@@
resume (Session ref) step
when (isStep step) $ setStepFlag
case r of
Resume expr tid breakMVar statusMVar bindings
when (isStep step) $ setStepFlag
case r of
Resume expr tid breakMVar statusMVar bindings
- final_ids apStack info _ _ _ -> do
+ final_ids apStack info _ hist _ -> do
withBreakAction (isStep step) (hsc_dflags hsc_env)
breakMVar statusMVar $ do
status <- withInterruptsSentTo
withBreakAction (isStep step) (hsc_dflags hsc_env)
breakMVar statusMVar $ do
status <- withInterruptsSentTo
@@
-366,14
+366,18
@@
resume (Session ref) step
-- this awakens the stopped thread...
return tid)
(takeMVar statusMVar)
-- this awakens the stopped thread...
return tid)
(takeMVar statusMVar)
- -- and wait for the result
+ -- and wait for the result
+ let hist' = case info of
+ Nothing -> fromListBL 50 hist
+ Just i -> History apStack i `consBL`
+ fromListBL 50 hist
case step of
RunAndLogSteps ->
traceRunStatus expr ref bindings final_ids
case step of
RunAndLogSteps ->
traceRunStatus expr ref bindings final_ids
- breakMVar statusMVar status emptyHistory
+ breakMVar statusMVar status hist'
_other ->
handleRunStatus expr ref bindings final_ids
_other ->
handleRunStatus expr ref bindings final_ids
- breakMVar statusMVar status emptyHistory
+ breakMVar statusMVar status hist'
back :: Session -> IO ([Name], Int, SrcSpan)
back :: Session -> IO ([Name], Int, SrcSpan)
@@
-632,6
+636,8
@@
consBL a (BL len bound left right)
toListBL (BL _ _ left right) = left ++ reverse right
toListBL (BL _ _ left right) = left ++ reverse right
+fromListBL bound l = BL (length l) bound l []
+
-- lenBL (BL len _ _ _) = len
-- -----------------------------------------------------------------------------
-- lenBL (BL len _ _ _) = len
-- -----------------------------------------------------------------------------