incipit-base-0.5.0.0: A Prelude for Polysemy – Base Reexports
Safe HaskellSafe-Inferred
LanguageHaskell2010

Incipit.Debug

Description

Utility functions for trace-printing values prefixed with the current source location.

Synopsis

Documentation

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

Print a Text in an arbitrary Monad.

dbgs :: forall a m. HasCallStack => Monad m => Show a => a -> m () Source #

Print a value with a Show instance in an arbitrary Monad.

dbgs_ :: forall a m. HasCallStack => Monad m => Show a => a -> m a Source #

Print a value with a Show instance in an arbitrary Monad, returning the value.

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

Like trace, but with Text and with source location prefix.

trs :: forall b a. Show b => HasCallStack => b -> a -> a Source #

Like traceShow, but with source location prefix.

trsi :: Show a => HasCallStack => a -> a Source #

Like traceShowId, but with source location prefix.