Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
class Covariant u => Distributive u where Source #
Let f :: Distributive g => (a -> g b)
When providing a new instance, you should ensure it satisfies the two laws: * Identity morphism: distribute . distribute ≡ identity * Interchange collection: collect f ≡ distribute . comap f
(>>-) :: Covariant t => t a -> (a -> u b) -> (u :.: t) b Source #
Infix version of collect
collect :: Covariant t => (a -> u b) -> t a -> (u :.: t) b Source #
Prefix version of >>-
distribute :: Covariant t => (t :.: u) a -> (u :.: t) a Source #
The dual of sequence