comonad-4.0: Comonads

Portability | non-portable (fundeps, MPTCs)
Stability | experimental
Maintainer | Edward Kmett <ekmett@gmail.com>
Safe Haskell | Trustworthy

Control.Comonad.Traced

Contents

- ComonadTraced class
- The Traced comonad
- The TracedT comonad transformer
- Re-exported modules

Description

Synopsis

- class Comonad w => ComonadTraced m w | w -> m where
  - trace :: m -> w a -> a
- traces :: ComonadTraced m w => (a -> m) -> w a -> a
- type Traced m = TracedT m Identity
- traced :: (m -> a) -> Traced m a
- runTraced :: Traced m a -> m -> a
- newtype TracedT m w a = TracedT {
  - runTracedT :: w (m -> a)
  }
- module Control.Comonad
- module Control.Comonad.Trans.Class
- module Data.Monoid

# ComonadTraced class

class Comonad w => ComonadTraced m w | w -> m where Source

Methods

trace :: m -> w a -> aSource

Instances

ComonadTraced m w => ComonadTraced m (IdentityT w) |
ComonadTraced m w => ComonadTraced m (StoreT s w) |
ComonadTraced m w => ComonadTraced m (EnvT e w) |
(Comonad w, Monoid m) => ComonadTraced m (TracedT m w) |

traces :: ComonadTraced m w => (a -> m) -> w a -> aSource

# The Traced comonad

type Traced m = TracedT m Identity Source

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

runTraced :: Traced m a -> m -> aSource

# The TracedT 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) |
(Typeable s, Typeable1 w) => Typeable1 (TracedT s 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) |

# Re-exported modules

module Control.Comonad

module Control.Comonad.Trans.Class

module Data.Monoid