trace-0.2.0.0: A monad transformer for tracing provenience of errors

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Trans.Trace

Synopsis

Documentation

data TraceT t e m α Source

A concrete monad transformer TraceT t e m where t is the type of tags/breadcrumbs, e is the type of errors, and m is the underlying monad.

Instances

MonadRWS r w s m => MonadRWS r w s (TraceT t e m) 
MonadBase b m => MonadBase b (TraceT t e m) 
MonadBaseControl b m => MonadBaseControl b (TraceT t e m) 
Monad m => MonadError e (TraceT t e m) 
MonadReader r m => MonadReader r (TraceT t e m) 
MonadState s m => MonadState s (TraceT t e m) 
MonadWriter w m => MonadWriter w (TraceT t e m) 
Monad m => MonadTrace t (TraceT t e m) 
MonadTrans (TraceT t e) 
MonadTransControl (TraceT t e) 
(Monad m, Functor m, Monoid e) => Alternative (TraceT t e m) 
Monad m => Monad (TraceT t e m) 
Functor m => Functor (TraceT t e m) 
MonadFix m => MonadFix (TraceT t e m) 
(Monad m, Monoid e) => MonadPlus (TraceT t e m) 
(Monad m, Functor m) => Applicative (TraceT t e m) 
MonadIO m => MonadIO (TraceT t e m) 
MonadCont m => MonadCont (TraceT t e m) 
type StT (TraceT t e) α = StT (ReaderT (Seq t)) (StT (ExceptT (ErrorTrace t e)) α) 
type StM (TraceT t e m) α = ComposeSt (TraceT t e) m α 

runTraceT :: (Functor m, Monad m) => TraceT t e m α -> m (Either (ErrorTrace t e) α) Source

Run a traced traced computation to get either its result, or an error and its provenience (ErrorTrace).