@hackage distributive0.5.3

Distributive functors -- Dual to Traversable

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

  • Installation

    Custom

  • Dependencies (0)

  • Dependents (58)

    @hackage/algebra, @hackage/proton, @hackage/waargonaut, @hackage/keid-core, @hackage/free, @hackage/blanks, 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.