BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:distributive-0.5.1@sha256:9d2df933a1f2dc2af86ebdd6197188669beaa92cb2551a046f2d411074e68737,2127

Module documentation for 0.5.1


Hackage Build Status

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

-Edward Kmett



  • Add Distributive instances for datatypes from Data.Semigroup and GHC.Generics
  • Add MINIMAL pragma for Distributive

  • A more elegant fix for builds on GHC 7.2

  • Fix builds on GHC 7.2


  • Added flags for removing some dependencies.
  • Support doctests when building to non-standard locations (such as when using stack.)
  • Support base-orphans


  • transformers 0.4 compatibility

  • Fixed builds with older versions of GHC


  • Added Data.Distributive.Generic.


  • Control.Monad.Instances is deprecated in GHC 7.8. Don’t import it there.


  • Added support for Data.Tagged and Data.Proxy.


  • Minor documentation fix


  • Added instances for Control.Applicative.Backwards and Data.Functor.Reverse from transformers 0.3, taking them from transformers-compat if necessary for transformers 0.2