Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Control.Monad.Loc
Description
This package defines a MonadLoc class for monads which support Monadic Call Traces. See http://pepeiborra.posterous.com/monadic-stack-traces-that-make-a-lot-of-sense
- Traces are only provided for explicitly annotated program points.
- This package installs the MonadLoc preprocessor for this purpose. To enable it include the following pragma at the top of your haskell source files:
{ -# OPTIONS_GHC -F -pgmF MonadLoc #- }
- There is also the TH macro
withLocTH
exported by Control.Monad.Loc.TH
Documentation
class Monad m => MonadLoc m where Source #
Generating stack traces for failures
Methods
withLoc :: String -> m a -> m a Source #
withLoc
records the given source location in the failure trace
if the underlying monad supports recording location traces
Instances
Monad m => MonadLoc m Source # | |
Defined in Control.Monad.Loc | |
MonadLoc m => MonadLoc (ListT m) Source # | |
(Monoid w, MonadLoc m) => MonadLoc (WriterT w m) Source # | |
(Monoid w, MonadLoc m) => MonadLoc (WriterT w m) Source # | |
MonadLoc m => MonadLoc (StateT s m) Source # | |
MonadLoc m => MonadLoc (StateT s m) Source # | |
MonadLoc m => MonadLoc (ReaderT r m) Source # | |
(Error e, MonadLoc m) => MonadLoc (ErrorT e m) Source # | |
(Monoid w, MonadLoc m) => MonadLoc (RWST r w s m) Source # | |
(Monoid w, MonadLoc m) => MonadLoc (RWST r w s m) Source # | |