Commit 7a68d354 authored by Simon Marlow's avatar Simon Marlow
Browse files

add a history test

parent 483ff634
......@@ -35,3 +35,5 @@ test('dynbrk004', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_scr
test('result001', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['result001.script'])
test('list001', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['list001.script'])
test('hist001', extra_run_opts('-fno-warn-monomorphism-restriction'), ghci_script, ['hist001.script'])
:l ../Test3.hs
-- set a break on the [] case in map
:b 1
-- trace an execution
:tr mymap (+1) [1,2]
:hist
:back
:show bindings
:back
:show bindings
:force _result
:back
:forward
-- at this point, we can't retrieve the bindings because _result (the AP_STACK)
-- was evaluated previously. GHCi should not crash, preferably.
Breakpoint 0 activated at ../Test3.hs:1:13-14
[2,3Stopped at ../Test3.hs:1:13-14
_result :: [a]
../Test3.hs:(1,0)-(2,30)
../Test3.hs:2:21-30
../Test3.hs:2:17-19
../Test3.hs:2:17-30
../Test3.hs:(1,0)-(2,30)
../Test3.hs:2:21-30
../Test3.hs:2:17-19
../Test3.hs:2:17-30
../Test3.hs:(1,0)-(2,30)
Logged breakpoint at ../Test3.hs:(1,0)-(2,30)
_result :: [a]
_result :: [a]
Logged breakpoint at ../Test3.hs:2:21-30
_result :: [a]
f :: t -> a
xs :: [t]
_result :: [a]
f :: t -> a
xs :: [t]
*** Ignoring breakpoint
_result = []
Logged breakpoint at ../Test3.hs:2:17-19
_result :: a
x :: t
f :: t -> a
Logged breakpoint at ../Test3.hs:2:21-30
_result :: [a]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment