Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Util.Debug

Contents

Synopsis

Documentation

activate :: Handle -> IO.IO () Source #

Write debug msgs to the given handle.

deactivate :: IO.IO () Source #

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.

forced by monad

traceM :: (CallStack.Stack, Show a, Monad m) => Text -> a -> m () Source #

Print a value in a monad. The monad will force it to be printed.

put :: (CallStack.Stack, MonadIO m, Show a) => Text -> a -> m () Source #