comonad-transformers-1.5.0.1: Comonad transformers

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Comonad.Trans.Discont.Strict

Contents

Description

Discont is the density comonad of a constant functor, just as Cont is a Codensity monad of a constant functor. (For the definition of Density and Codensity, see the non-Haskell 98 adjunctions package)

Note that while Discont and Store are isomorphic, DiscontT and StoreT are not.

Synopsis

The discontinuation comonad

discont :: (s -> a) -> s -> Discont s aSource

The discontinuation comonad transformer

runDiscont :: Discont s a -> (s -> a, s)Source

data DiscontT s w a Source

Constructors

DiscontT (w s -> a) (w s) 

runDiscontT :: DiscontT s w a -> (w s -> a, w s)Source

Combinators

callCV :: DiscontT s w (DiscontT s w (DiscontT s w a -> a) -> b) -> bSource

label :: Comonad w => DiscontT s w a -> sSource