packages feed

distributive 0.3.1 → 0.3.2

raw patch · 3 files changed

+14/−5 lines, 3 files

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+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
distributive.cabal view
@@ -1,6 +1,6 @@ name:          distributive category:      Data Structures-version:       0.3.1+version:       0.3.2 license:       BSD3 cabal-version: >= 1.8 license-file:  LICENSE
src/Data/Distributive.hs view
@@ -26,12 +26,16 @@ import Data.Functor.Product import Data.Functor.Reverse -{-# ANN module "ignore Use section" #-} --- | This is the categorical dual of 'Traversable'. However, there appears--- to be little benefit to allow the distribution via an arbitrary comonad--- so we restrict ourselves to 'Functor'.+-- | This is the categorical dual of 'Traversable'.  --+-- Due to the lack of non-trivial comonoids in Haskell, we can restrict+-- ourselves to requiring a 'Functor' rather than+-- some Coapplicative class. Categorically every 'Distributive'+-- functor is actually a right adjoint, and so it must be 'Representable'+-- endofunctor and preserve all limits. This is a fancy way of saying it+-- isomorphic to `(->) x` for some x.+-- -- Minimal complete definition: 'distribute' or 'collect' -- -- To be distributable a container will need to have a way to consistently@@ -39,6 +43,7 @@ -- means that the holes in all values of that type, must have the same -- cardinality, fixed sized vectors, infinite streams, functions, etc. -- and no extra information to try to merge together.+-- class Functor g => Distributive g where   -- | The dual of 'Data.Traversable.sequenceA'   --