Safe Haskell | Safe-Inferred |
---|

## Synopsis

- full :: (Eq a, Monoid a) => (a -> a) -> a -> a
- fullM :: (Monad m, Eq a, Monoid a) => (a -> m ()) -> a -> m ()
- trace :: (HasCallStack, Show a) => Text -> a -> a
- tracep :: (HasCallStack, Pretty.Pretty a) => Text -> a -> a
- traces :: (HasCallStack, Show b) => Text -> b -> a -> a
- tracesp :: (HasCallStack, Pretty.Pretty b) => Text -> b -> a -> a
- tracef :: (HasCallStack, Show b) => Text -> (a -> b) -> a -> a
- tracefp :: (HasCallStack, Pretty.Pretty b) => Text -> (a -> b) -> a -> a
- trace_ret :: (HasCallStack, Show a, Show b) => Text -> a -> b -> b
- trace_retp :: (HasCallStack, Pretty.Pretty a, Pretty.Pretty b) => Text -> a -> b -> b
- trace_str :: HasCallStack => Text -> a -> a
- traceM :: (HasCallStack, Show a, Monad m) => Text -> a -> m ()
- tracepM :: (HasCallStack, Pretty.Pretty a, Monad m) => Text -> a -> m ()
- tracesM :: (HasCallStack, Monad m) => Text -> m ()
- puts :: (HasCallStack, MonadIO m) => Text -> m ()
- put :: (HasCallStack, MonadIO m, Show a) => Text -> a -> m ()
- putp :: (HasCallStack, MonadIO m, Pretty.Pretty a) => Text -> a -> m ()

# 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

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

Pretty print a value en passant.

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_retp :: (HasCallStack, Pretty.Pretty a, Pretty.Pretty b) => Text -> a -> b -> b Source #

# 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 #

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