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
-- 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
- breakMVar statusMVar status emptyHistory
+ breakMVar statusMVar status hist'
_other ->
handleRunStatus expr ref bindings final_ids
- breakMVar statusMVar status emptyHistory
+ breakMVar statusMVar status hist'
back :: Session -> IO ([Name], Int, SrcSpan)
toListBL (BL _ _ left right) = left ++ reverse right
+fromListBL bound l = BL (length l) bound l []
+
-- lenBL (BL len _ _ _) = len
-- -----------------------------------------------------------------------------