Module Debug.Trace

This library contains some useful operation for debugging programs.

Author: Bjoern Peemoeller

Version: September 2014

Summary of exported operations:

trace :: String -> a -> a  Deterministic 
Prints the first argument as a side effect and behaves as identity on the second argument.
traceId :: String -> String  Deterministic 
Prints the first argument as a side effect and returns it afterwards.
traceShow :: Show a => a -> b -> b  Deterministic 
Prints the first argument using show and returns the second argument afterwards.
traceShowId :: Show a => a -> a  Deterministic 
Prints the first argument using show and returns it afterwards.
traceIO :: String -> IO ()  Deterministic 
Output a trace message from the IO monad.
assert :: Bool -> String -> a -> a  Deterministic 
Assert a condition w.r.t.
assertIO :: Bool -> String -> IO ()  Deterministic 
Assert a condition w.r.t.

Exported operations:

trace :: String -> a -> a  Deterministic 

Prints the first argument as a side effect and behaves as identity on the second argument.

traceId :: String -> String  Deterministic 

Prints the first argument as a side effect and returns it afterwards.

traceShow :: Show a => a -> b -> b  Deterministic 

Prints the first argument using show and returns the second argument afterwards.

traceShowId :: Show a => a -> a  Deterministic 

Prints the first argument using show and returns it afterwards.

traceIO :: String -> IO ()  Deterministic 

Output a trace message from the IO monad.

assert :: Bool -> String -> a -> a  Deterministic 

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 ()  Deterministic 

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.