comonad-4.2.5: Comonads

Copyright(C) 2008-2014 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Comonad.Trans.Traced

Contents

Description

The trace comonad builds up a result by prepending monoidal values to each other.

This module specifies the traced comonad transformer (aka the cowriter or exponential comonad transformer).

Synopsis

Traced comonad

traced :: (m -> a) -> Traced m a Source

runTraced :: Traced m a -> m -> a Source

Traced comonad transformer

newtype TracedT m w a Source

Constructors

TracedT 

Fields

runTracedT :: w (m -> a)
 

Instances

(ComonadEnv e w, Monoid m) => ComonadEnv e (TracedT m w) 
(ComonadStore s w, Monoid m) => ComonadStore s (TracedT m w) 
(Comonad w, Monoid m) => ComonadTraced m (TracedT m w) 
Monoid m => ComonadTrans (TracedT m) 
Monoid m => ComonadHoist (TracedT m) 
Functor w => Functor (TracedT m w) 
Applicative w => Applicative (TracedT m w) 
Distributive w => Distributive (TracedT m w) 
(ComonadApply w, Monoid m) => ComonadApply (TracedT m w) 
(Comonad w, Monoid m) => Comonad (TracedT m w) 
Typeable (* -> (* -> *) -> * -> *) TracedT 

Operations

trace :: Comonad w => m -> TracedT m w a -> a Source

listen :: Functor w => TracedT m w a -> TracedT m w (a, m) Source

listens :: Functor w => (m -> b) -> TracedT m w a -> TracedT m w (a, b) Source

censor :: Functor w => (m -> m) -> TracedT m w a -> TracedT m w a Source