Copyright | (C) 2008-2014 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
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
- type Traced m = TracedT m Identity
- traced :: (m -> a) -> Traced m a
- runTraced :: Traced m a -> m -> a
- newtype TracedT m (w :: Type -> Type) a = TracedT {
- runTracedT :: w (m -> a)
- trace :: forall (w :: Type -> Type) m a. Comonad w => m -> TracedT m w a -> a
- listen :: forall (w :: Type -> Type) m a. Functor w => TracedT m w a -> TracedT m w (a, m)
- listens :: forall (w :: Type -> Type) m b a. Functor w => (m -> b) -> TracedT m w a -> TracedT m w (a, b)
- censor :: forall (w :: Type -> Type) m a. Functor w => (m -> m) -> TracedT m w a -> TracedT m w a
Traced comonad
Traced comonad transformer
newtype TracedT m (w :: Type -> Type) a Source #
TracedT | |
|