This library contains some useful operation for debugging programs.
Exported Functions: assert, assertIO, trace, traceId, traceIO, traceShow, traceShowId
Prints the first argument as a side effect and behaves as identity on the second argument.
Prints the first argument as a side effect and returns it afterwards.
traceShow
:: Show a => a -> b -> b
Prints the first argument using show
and returns the second argument
afterwards.
traceShowId
:: Show a => a -> a
Prints the first argument using show
and returns it afterwards.
Output a trace message from the IO
monad.
assert
:: Bool -> String -> a -> a
Assert a condition w.r.t. an error message. If the condition is not met it fails with the given error message, otherwise the third argument is returned.
assertIO
:: Bool -> String -> IO ()
Assert a condition w.r.t. an error message from the IO
monad.
If the condition is not met it fails with the given error message.