Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Util.Debug

Synopsis

# Documentation

Write debug msgs to the given handle.

Suppress debug msgs.

full :: (Eq a, Monoid a) => (a -> a) -> a -> a Source #

Only apply the function if the val is non-mempty. Useful for the trace family.

fullM :: (Monad m, Eq a, Monoid a) => (a -> m ()) -> a -> m () Source #

Like full but useful for the traceM and put family.

# forced by evaluation

trace :: (CallStack.Stack, Show a) => Text -> a -> a Source #

Print a showable value en passant.

tracep :: (CallStack.Stack, Pretty.Pretty a) => Text -> a -> a Source #

Pretty print a value en passant.

traces :: (CallStack.Stack, Show b) => Text -> b -> a -> a Source #

Print a showable value.

tracesp :: (CallStack.Stack, Pretty.Pretty b) => Text -> b -> a -> a Source #

Pretty print a value.

tracef :: (CallStack.Stack, Show b) => Text -> (a -> b) -> a -> a Source #

Print a value after applying a function to it.

tracefp :: (CallStack.Stack, Pretty.Pretty b) => Text -> (a -> b) -> a -> a Source #

trace_ret :: (CallStack.Stack, Show a, Show b) => Text -> a -> b -> b Source #

Trace input and output of a function.

trace_str :: CallStack.Stack => Text -> a -> a Source #

Show a raw string, equivalent to trace.