diff options
Diffstat (limited to 'testsuite/tests/ghci.debugger/scripts')
3 files changed, 12 insertions, 3 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/break017.script b/testsuite/tests/ghci.debugger/scripts/break017.script index 8873b1a0d8..d598a474d7 100644 --- a/testsuite/tests/ghci.debugger/scripts/break017.script +++ b/testsuite/tests/ghci.debugger/scripts/break017.script @@ -1,11 +1,17 @@ :l QSort.hs :set -fbreak-on-exception :trace qsort ("abc" ++ undefined) + +-- Back up to the (filter (<=a) as) call :back +:back + putStrLn "Printing 1" :print as + putStrLn "Forcing" :force as + -- this should print the exception putStrLn "Printing 2" :print as diff --git a/testsuite/tests/ghci.debugger/scripts/break017.stdout b/testsuite/tests/ghci.debugger/scripts/break017.stdout index 0de6e662ac..af22c066e6 100644 --- a/testsuite/tests/ghci.debugger/scripts/break017.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break017.stdout @@ -1,5 +1,8 @@ "Stopped in <exception thrown>, <unknown> _exception :: e = _ +Logged breakpoint at QSort.hs:6:32-34 +_result :: Char -> Bool +a :: Char Logged breakpoint at QSort.hs:6:24-38 _result :: [Char] a :: Char @@ -9,7 +12,7 @@ as = 'b' : 'c' : (_t1::[Char]) Forcing *** Exception: Prelude.undefined CallStack (from HasCallStack): - error, called at libraries/base/GHC/Err.hs:79:14 in base:GHC.Err + error, called at libraries/base/GHC/Err.hs:75:14 in base:GHC.Err undefined, called at <interactive>:3:17 in interactive:Ghci1 Printing 2 as = 'b' : 'c' : (_t2::[Char]) diff --git a/testsuite/tests/ghci.debugger/scripts/listCommand001.stdout b/testsuite/tests/ghci.debugger/scripts/listCommand001.stdout index 956ae6a97a..5aeb38bcd6 100644 --- a/testsuite/tests/ghci.debugger/scripts/listCommand001.stdout +++ b/testsuite/tests/ghci.debugger/scripts/listCommand001.stdout @@ -5,10 +5,10 @@ cannot list source code for map: module GHC.Base is not interpreted 1 mymap f [] = [] 2 mymap f (x:xs) = f x:mymap f xs 3 -4 main = mapM_ putStrLn $ mymap ('a':) ["hello","bye"] +4 main = mapM_ putStrLn $ mymap ('a':) ["hello","bye"] 5 3 -4 main = mapM_ putStrLn $ mymap ('a':) ["hello","bye"] +4 main = mapM_ putStrLn $ mymap ('a':) ["hello","bye"] 5 syntax: :list [<line> | <module> <line> | <identifier>] syntax: :list [<line> | <module> <line> | <identifier>] |