| License | BSD-style (see the file LICENSE) |
|---|---|
| Maintainer | sjoerd@w3future.com |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.Category.Kleisli
Description
This is an attempt at the Kleisli category, and the construction of an adjunction for each monad.
Documentation
data Kleisli m a b where Source #
Constructors
| Kleisli :: (Functor m, Dom m ~ k, Cod m ~ k) => Monad m -> Obj k b -> k a (m :% b) -> Kleisli m a b |
newtype KleisliFree m Source #
Constructors
| KleisliFree (Monad m) |
Instances
| (Functor m, Dom m ~ k, Cod m ~ k) => Functor (KleisliFree m) Source # | |
Defined in Data.Category.Kleisli Associated Types type Dom (KleisliFree m) :: Type -> Type -> Type Source # type Cod (KleisliFree m) :: Type -> Type -> Type Source # type (KleisliFree m) :% a Source # Methods (%) :: KleisliFree m -> Dom (KleisliFree m) a b -> Cod (KleisliFree m) (KleisliFree m :% a) (KleisliFree m :% b) Source # | |
| type Cod (KleisliFree m) Source # | |
Defined in Data.Category.Kleisli | |
| type Dom (KleisliFree m) Source # | |
Defined in Data.Category.Kleisli | |
| type (KleisliFree m) :% a Source # | |
Defined in Data.Category.Kleisli | |
data KleisliForget m Source #
Constructors
| KleisliForget |
Instances
| (Functor m, Dom m ~ k, Cod m ~ k) => Functor (KleisliForget m) Source # | |
Defined in Data.Category.Kleisli Associated Types type Dom (KleisliForget m) :: Type -> Type -> Type Source # type Cod (KleisliForget m) :: Type -> Type -> Type Source # type (KleisliForget m) :% a Source # Methods (%) :: KleisliForget m -> Dom (KleisliForget m) a b -> Cod (KleisliForget m) (KleisliForget m :% a) (KleisliForget m :% b) Source # | |
| type Cod (KleisliForget m) Source # | |
Defined in Data.Category.Kleisli | |
| type Dom (KleisliForget m) Source # | |
Defined in Data.Category.Kleisli | |
| type (KleisliForget m) :% a Source # | |
Defined in Data.Category.Kleisli | |
kleisliAdj :: (Functor m, Dom m ~ k, Cod m ~ k) => Monad m -> Adjunction (Kleisli m) k (KleisliFree m) (KleisliForget m) Source #