comonad-transformers-0.1.1: Haskell 98 comonad transformers

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Comonad.Trans.Discont

Description

Discont is the Density comonad of a constant functor, just as Cont is a Codensity monad of a constant functor.

Note that Discont and Context are isomorphic, but DiscontT and ContextT are not.

Documentation

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

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

data DiscontT s w a Source

Constructors

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

Instances

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

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