|
Control.Functor.Composition | Portability | non-portable (class-associated types) | Stability | experimental | Maintainer | Edward Kmett <ekmett@gmail.com> |
|
|
|
Description |
Generalized functor composition.
Since we have many reasons for which you might want to compose a functor, and many
expected results. i.e. monads via adjunctions, monads via composition with a pointed
endofunctor, etc. we have to make multiple composition operators.
|
|
Synopsis |
|
|
|
Documentation |
|
|
Basic functor composition
| Constructors | | Instances | |
|
|
class Composition o where | Source |
|
| Methods | decompose :: (f `o` g) x -> f (g x) | Source |
| | compose :: f (g x) -> (f `o` g) x | Source |
|
| | Instances | |
|
|
|
The only reason the compositions are all the same is for type inference. This can be liberalized.
|
|
|
|
|
An infix alias for functor composition
|
|
|
|
|
|
|
Bifunctor composition
| Instances | (Bifunctor p Hask Hask Hask, Symmetric Hask f, Symmetric Hask g) => Symmetric Hask (Comp p f g) | (Bifunctor p Hask Hask Hask, Braided Hask f, Braided Hask g) => Braided Hask (Comp p f g) | (Bifunctor p c d Hask, QFunctor f b c, QFunctor g b d) => QFunctor (Comp p f g) b Hask | (Bifunctor p c d Hask, PFunctor f a c, PFunctor g a d) => PFunctor (Comp p f g) a Hask | (Bifunctor p c d Hask, Bifunctor f a b c, Bifunctor g a b d) => Bifunctor (Comp p f g) a b Hask | (Bifunctor p Hask Hask Hask, Bifunctor f Hask Hask Hask, Bifunctor g Hask Hask Hask) => Functor (Comp p f g a) |
|
|
|
|
Bifunctor coproduct
|
|
|
Bifunctor product
|
|
|
|
Produced by Haddock version 2.4.2 |