BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:distributive-0.6.2.1@sha256:0f99f5541cca04acf89b64432b03422b6408e830a8dff30e6c4334ef1a48680c,2996

Module documentation for 0.6.2.1

distributive

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 irc.freenode.net.

-Edward Kmett

Changes

0.6.2.1 [2020.12.30]

  • The build-type has been changed from Custom to Simple. To achieve this, the doctests test suite has been removed in favor of using cabal-docspec to run the doctests.

0.6.2 [2020.04.10]

  • Make the Distributive instance for Tagged poly-kinded.

0.6.1 [2019.09.06]

  • Add a Distributive instance for WrappedMonad m.

0.6 [2018.07.02]

  • Remove fmapCollect. (See here for an explanation of why it was removed.)
  • Avoid incurring some dependencies when using recent GHCs.

0.5.3

  • Support doctest-0.12

0.5.2

  • Revamp Setup.hs to use cabal-doctest. This makes distributive build with Cabal-1.25, and makes the doctests work with cabal new-build and sandboxes.
  • Fix bugs in Data.Distributive.Generic that cause generic Distributive instances not to work properly for datatypes with recursive types
  • Add genericCollect to Data.Distributive.Generic, and switch the underlying machinery in that module to work on a collect-like method instead of a distribute-like one
  • Add a test suite for regression-testing Data.Distributive.Generic

0.5.1

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

0.5.0.2

  • A more elegant fix for builds on GHC 7.2

0.5.0.1

  • Fix builds on GHC 7.2

0.5

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

0.4.4

  • transformers 0.4 compatibility

0.4.3.1

  • Fixed builds with older versions of GHC

0.4.2

  • Added Data.Distributive.Generic.

0.4.1

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

0.4

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

0.3.1

  • Minor documentation fix

0.3

  • 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