Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/golden/T159b/T159b.fails-310.ghc-914.hdb-stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[1 of 2] Compiling Main ( <TEMPORARY-DIRECTORY>/T159b.hs, interpreted )[main]
(hdb) BreakFound {changed = True, breakId = [InternalBreakpointId Main 16], sourceSpan = SourceSpan {file = "<TEMPORARY-DIRECTORY>/T159b.hs", startLine = 12, endLine = 12, startCol = 3, endCol = 47}}
(hdb) Stopped at breakpoint
(hdb) [DbgStackFrame {name = "Main.foo", sourceSpan = SourceSpan {file = "<TEMPORARY-DIRECTORY>/T159b.hs", startLine = 12, endLine = 12, startCol = 3, endCol = 47}, breakId = Just InternalBreakpointId Main 16},DbgStackFrame {name = "Lovely annotation", sourceSpan = SourceSpan {file = "", startLine = 0, endLine = 0, startCol = 0, endCol = 0}, breakId = Nothing},DbgStackFrame {name = "[1,2,3,4]", sourceSpan = SourceSpan {file = "", startLine = 0, endLine = 0, startCol = 0, endCol = 0}, breakId = Nothing},DbgStackFrame {name = "annotateCallStackIO, called at <TEMPORARY-DIRECTORY>/T159b.hs:5:3 in main:Main", sourceSpan = SourceSpan {file = "", startLine = 0, endLine = 0, startCol = 0, endCol = 0}, breakId = Nothing}]
(hdb) Exiting...
6 changes: 6 additions & 0 deletions test/golden/T159b/T159b.fails-310.ghc-915.hdb-stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[1 of 3] Compiling GHC.Debugger.View.Class ( in-memory:GHC.Debugger.View.Class, in-memory:GHC.Debugger.View.gbc )[haskell-debugger-view-in-memory]
[2 of 3] Compiling Main ( <TEMPORARY-DIRECTORY>/T159b.hs, <TEMPORARY-DIRECTORY>/.hdb-cache/<CACHE-ENTRY>/Main.gbc )[main]
(hdb) BreakFound {changed = True, breakId = [InternalBreakpointId Main 16], sourceSpan = SourceSpan {file = "<TEMPORARY-DIRECTORY>/T159b.hs", startLine = 12, endLine = 12, startCol = 3, endCol = 47}}
(hdb) Stopped at breakpoint
(hdb) [DbgStackFrame {name = "Main.foo", sourceSpan = SourceSpan {file = "<TEMPORARY-DIRECTORY>/T159b.hs", startLine = 12, endLine = 12, startCol = 3, endCol = 47}, breakId = Just InternalBreakpointId Main 16},DbgStackFrame {name = "Lovely annotation, called at <TEMPORARY-DIRECTORY>/T159b.hs:7:7 in main:Main", sourceSpan = SourceSpan {file = "", startLine = 0, endLine = 0, startCol = 0, endCol = 0}, breakId = Nothing},DbgStackFrame {name = "[1,2,3,4], called at <TEMPORARY-DIRECTORY>/T159b.hs:6:5 in main:Main", sourceSpan = SourceSpan {file = "", startLine = 0, endLine = 0, startCol = 0, endCol = 0}, breakId = Nothing},DbgStackFrame {name = "annotateCallStackIO, called at <TEMPORARY-DIRECTORY>/T159b.hs:5:3 in main:Main", sourceSpan = SourceSpan {file = "", startLine = 0, endLine = 0, startCol = 0, endCol = 0}, breakId = Nothing}]
(hdb) Exiting...
3 changes: 3 additions & 0 deletions test/golden/T159b/T159b.fails-310.hdb-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

$HDB -v0 T159b.hs < T159b.hdb-stdin 2>&1 || true
3 changes: 3 additions & 0 deletions test/golden/T159b/T159b.hdb-stdin
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
break T159b.hs 12
run
backtrace
12 changes: 12 additions & 0 deletions test/golden/T159b/T159b.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import GHC.Stack.Annotation.Experimental (annotateCallStackIO,annotateStackShowIO,annotateStackStringIO)

main :: IO ()
main = do
annotateCallStackIO $ do
annotateStackShowIO ([1..4] :: [Int]) $ do
annotateStackStringIO "Lovely annotation" $ do
foo 500

foo :: Int -> IO ()
foo arg =
putStrLn $ "foo: " <> show (arg * arg * arg)
8 changes: 8 additions & 0 deletions test/golden/T159b/hie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cradle:
direct:
arguments:
- -i
- -i.
- T159b.hs
- -package base
- -package ghc-experimental
Loading