Distributive functors -- Dual to Traversable
|Version on this page:||0.4.4|
|LTS Haskell 20.23:||0.6.2.1@rev:1|
|Stackage Nightly 2023-06-04:||0.6.2.1@rev:1|
|Latest on Hackage:||0.6.2.1@rev:1|
Maintained by Edward A. Kmett
This version can be pinned in stack with:
Module documentation for 0.4.4
Depends on 5 packages(full list with versions):
Used by 13 packages in lts-0.7(full list with versions):
This package provides the notion that is categorically dual to
Functor is one that you can push any functor inside of.
distribute :: (Functor f, Distributive g) => f (g a) -> g (f a)
Compare this with the corresponding Traversable notion,
sequenceA :: (Applicative f, Traversable g) => g (f a) -> f (g a)
This package includes instances for common types, and includes other methods similar to
traverse which fuse the use of
We only require
Functor rather than some dual notion to
Applicative, because the latter cannot meaningfully exist in Haskell
since all comonoids there are trivial.
Contributions and bug reports are welcome!
Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.
- Fixed builds with older versions of GHC
Control.Monad.Instancesis deprecated in GHC 7.8. Don’t import it there.
- Added support for
- Minor documentation fix
- Added instances for
transformers0.3, taking them from
transformers-compatif necessary for