Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
data CacheEvent k t v Source #
CacheEvict | |
| |
CacheAdd | |
|
Instances
type CacheTrace k t v = DList (CacheEvent k t v) Source #
class MonadTrace (trc :: Bool) where Source #
trace :: Applicative m => w -> Tracable trc w m () Source #
Instances
MonadTrace False Source # | |
Defined in Data.Cache.Trace | |
MonadTrace True Source # | |
Defined in Data.Cache.Trace |
class MonadAtomicRef m => MonadAtomicRefTraced trc w m where Source #
atomicModifyRefTraced :: Ref m a -> (a -> (a, w, b)) -> Tracable trc w m b Source #
Atomically mutate the contents of a reference with trace data output
atomicModifyRefTraced' :: Ref m a -> (a -> (a, w, b)) -> Tracable trc w m b Source #
Strict version of atomicModifyRefTraced. This forces both the value stored in the reference as well as the value returned but not the trace.
atomicModifyRefTracedM' :: Ref m a -> (forall m'. Monad m' => a -> Tracable trc w m' (a, b)) -> Tracable trc w m b Source #
Strict Monadic update function so that tracing is closer to zero cost when unused.
Instances
(MonadAtomicRef m, Monoid w) => MonadAtomicRefTraced False w m Source # | |
Defined in Data.Cache.Trace atomicModifyRefTraced :: Ref m a -> (a -> (a, w, b)) -> Tracable False w m b Source # atomicModifyRefTraced' :: Ref m a -> (a -> (a, w, b)) -> Tracable False w m b Source # atomicModifyRefTracedM' :: Ref m a -> (forall (m' :: Type -> Type). Monad m' => a -> Tracable False w m' (a, b)) -> Tracable False w m b Source # | |
(MonadAtomicRef m, Monoid w) => MonadAtomicRefTraced True w m Source # | |
Defined in Data.Cache.Trace atomicModifyRefTraced :: Ref m a -> (a -> (a, w, b)) -> Tracable True w m b Source # atomicModifyRefTraced' :: Ref m a -> (a -> (a, w, b)) -> Tracable True w m b Source # atomicModifyRefTracedM' :: Ref m a -> (forall (m' :: Type -> Type). Monad m' => a -> Tracable True w m' (a, b)) -> Tracable True w m b Source # |
atomicModifyRefTracedM'_ :: (MonadAtomicRefTraced trc w m, forall mg. Monad mg => Functor (Tracable trc w mg)) => Ref m a -> (forall m'. (Monad m', Functor (Tracable trc w m')) => a -> Tracable trc w m' a) -> Tracable trc w m () Source #
data family Tracable (trc :: Bool) :: * -> (* -> *) -> * -> * Source #