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

Stability | experimental |

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

The density comonad for a functor. aka the comonad generated by a functor The ''density'' 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