0 | module Debug.Trace
 1 |
 2 | import Prelude
 3 | import PrimIO
 4 |
 5 | %default total
 6 |
 7 | export
 8 | trace : (msg : String) -> (result : a) -> a
 9 | trace x val = unsafePerformIO (do putStrLn xpure val)
10 |
11 | export %inline
12 | traceValBy : (msgF : a -> String) -> (result : a) -> a
13 | traceValBy f v = trace (f v) v
14 |
15 | export %inline
16 | traceVal : Show a => a -> a
17 | traceVal = traceValBy show
18 |