json-tracer-0.0.3.0: A polymorphic, type-safe, json-structured tracing library

Copyright(c) Taku Terao 2017
LicenseBSD3
Maintainerautotaker@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Trans.CTrace

Description

Contextual tracing monad transformer. transformers-compatible.

Synopsis

Documentation

data TracerT c m a Source #

Contextual tracing monad transformer type. Tracing context c can be modified through this monad.

Instances

MonadRWS r w s m => MonadRWS r w s (TracerT c m) Source # 
MonadWriter w m => MonadWriter w (TracerT c m) Source # 

Methods

writer :: (a, w) -> TracerT c m a #

tell :: w -> TracerT c m () #

listen :: TracerT c m a -> TracerT c m (a, w) #

pass :: TracerT c m (a, w -> w) -> TracerT c m a #

MonadState s m => MonadState s (TracerT c m) Source # 

Methods

get :: TracerT c m s #

put :: s -> TracerT c m () #

state :: (s -> (a, s)) -> TracerT c m a #

MonadReader r m => MonadReader r (TracerT c m) Source # 

Methods

ask :: TracerT c m r #

local :: (r -> r) -> TracerT c m a -> TracerT c m a #

reader :: (r -> a) -> TracerT c m a #

MonadError e m => MonadError e (TracerT c m) Source # 

Methods

throwError :: e -> TracerT c m a #

catchError :: TracerT c m a -> (e -> TracerT c m a) -> TracerT c m a #

MonadIO m => MonadTrace c (TracerT c m) Source # 

Methods

update :: (c -> c) -> TracerT c m () Source #

zoom' :: ASetter' c c -> TracerT c m a -> TracerT c m a Source #

MonadTrans (TracerT c) Source # 

Methods

lift :: Monad m => m a -> TracerT c m a #

Monad m => Monad (TracerT c m) Source # 

Methods

(>>=) :: TracerT c m a -> (a -> TracerT c m b) -> TracerT c m b #

(>>) :: TracerT c m a -> TracerT c m b -> TracerT c m b #

return :: a -> TracerT c m a #

fail :: String -> TracerT c m a #

Functor m => Functor (TracerT c m) Source # 

Methods

fmap :: (a -> b) -> TracerT c m a -> TracerT c m b #

(<$) :: a -> TracerT c m b -> TracerT c m a #

MonadFix m => MonadFix (TracerT c m) Source # 

Methods

mfix :: (a -> TracerT c m a) -> TracerT c m a #

Applicative m => Applicative (TracerT c m) Source # 

Methods

pure :: a -> TracerT c m a #

(<*>) :: TracerT c m (a -> b) -> TracerT c m a -> TracerT c m b #

liftA2 :: (a -> b -> c) -> TracerT c m a -> TracerT c m b -> TracerT c m c #

(*>) :: TracerT c m a -> TracerT c m b -> TracerT c m b #

(<*) :: TracerT c m a -> TracerT c m b -> TracerT c m a #

MonadIO m => MonadIO (TracerT c m) Source # 

Methods

liftIO :: IO a -> TracerT c m a #

MonadCont m => MonadCont (TracerT c m) Source # 

Methods

callCC :: ((a -> TracerT c m b) -> TracerT c m a) -> TracerT c m a #

mapTracerT :: (m a -> n b) -> TracerT c m a -> TracerT c n b Source #

Transform the base monad

runTracerT :: ((c -> c) -> IO ()) -> TracerT c m a -> m a Source #

Run the tracer monad with the specified update action.

zoom :: ASetter' c c' -> TracerT c' m a -> TracerT c m a Source #

Change the tracing context.

update :: MonadIO m => (c -> c) -> TracerT c m () Source #

Perform modification on the tracing context

noTracerT :: Monad m => TracerT c m a -> m a Source #

Run the tracer monad without tracing.

ioTracerT :: MonadIO m => c -> TracerT c m a -> m (a, c) Source #

Run the tracer monad with update action implemented by IORef