@hackage distributive0.6
Distributive functors -- Dual to Traversable
Categories
License
BSD-3-Clause
Maintainer
Edward A. Kmett <ekmett@gmail.com>
Links
Versions
Installation
CustomTested Compilers
Dependencies (7)
- base >=4 && <5
- base-orphans >=0.5.2 && <1
- ghc-prim
- semigroups >=0.13 && <1
- tagged >=0.7 && <1
- transformers >=0.3 && <0.6 Show all…
Dependents (98)
@hackage/trivia, @hackage/algebra, @hackage/ComonadSheet, @hackage/proton, @hackage/waargonaut, @hackage/keid-core, Show all…
Package Flags
semigroups
(on by default)
You can disable the use of the semigroups package using `-f-semigroups`.
Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
tagged
(on by default)
You can disable the use of the tagged package using `-f-tagged`.
Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
distributive
This package provides the notion that is categorically dual to Traversable.
A Distributive 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.
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 fmap.
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.
Contact Information
Contributions and bug reports are welcome!
Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.
-Edward Kmett
