Module Debug.Trace

This library contains some useful operation for debugging programs.

Category
general
Author
Bjoern Peemoeller
Version
September 2014

Exported Functions: assert, assertIO, trace, traceId, traceIO, traceShow, traceShowId


Exported Functions


trace :: String -> a -> a  Deterministic 

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

Further infos:
  • might behave indeterministically

traceId :: String -> String  Deterministic 

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

Further infos:
  • might behave indeterministically

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

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

Further infos:
  • might behave indeterministically

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

Prints the first argument using show and returns it afterwards.

Further infos:
  • might behave indeterministically

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.