Portability | non-portable (GADTs, MPTCs) |
---|---|

Stability | experimental |

Maintainer | Edward Kmett <ekmett@gmail.com> |

The densityT comonad for a functor. aka the comonad cogenerated by a functor The ''densityT'' term dates back to Dubuc''s 1974 thesis. The term ''monad genererated by a functor'' dates back to 1972 in Street''s ''Formal Theory of Monads''.

- data DensityT k a where
- liftDensityT :: Comonad w => w a -> DensityT w a
- densityTToAdjunction :: Adjunction f g => DensityT f a -> f (g a)
- adjunctionToDensityT :: Adjunction f g => f (g a) -> DensityT f a

# Documentation

liftDensityT :: Comonad w => w a -> DensityT w aSource

The natural isomorphism between a comonad w and the comonad generated by w (forwards).

densityTToAdjunction :: Adjunction f g => DensityT f a -> f (g a)Source

adjunctionToDensityT :: Adjunction f g => f (g a) -> DensityT f aSource