Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Util.Debug

Synopsis

Documentation

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 :: (HasCallStack, Show a) => Text -> a -> a Source #

Print a showable value en passant.

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

Pretty print a value en passant.

traces :: (HasCallStack, Show b) => Text -> b -> a -> a Source #

Print a showable value.

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

Pretty print a value.

tracef :: (HasCallStack, Show b) => Text -> (a -> b) -> a -> a Source #

Print a value after applying a function to it.

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

trace_ret :: (HasCallStack, Show a, Show b) => Text -> a -> b -> b Source #

Trace input and output of a function.

trace_str :: HasCallStack => Text -> a -> a Source #

Show a raw string, equivalent to trace.

forced by monad

traceM :: (HasCallStack, Show a, Monad m) => Text -> a -> m () Source #

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

tracepM :: (HasCallStack, Pretty.Pretty a, Monad m) => Text -> a -> m () Source #

tracesM :: (HasCallStack, Monad m) => Text -> m () Source #

puts :: (HasCallStack, MonadIO m) => Text -> m () Source #

put :: (HasCallStack, MonadIO m, Show a) => Text -> a -> m () Source #

putp :: (HasCallStack, MonadIO m, Pretty.Pretty a) => Text -> a -> m () Source #