packages feed

chan-split 0.2.0 → 0.3.0

raw patch · 2 files changed

+11/−11 lines, 2 filesdep +contravariantdep −cofunctorPVP ok

version bump matches the API change (PVP)

Dependencies added: contravariant

Dependencies removed: cofunctor

API changes (from Hackage documentation)

- Control.Concurrent.Chan.Split: instance Cofunctor InChan
+ Control.Concurrent.Chan.Split: instance Contravariant InChan

Files

Control/Concurrent/Chan/Split.hs view
@@ -12,16 +12,16 @@     ) where  import qualified Control.Concurrent.Chan as C-import Data.Cofunctor+import Data.Functor.Contravariant import Control.Applicative import Control.Arrow import Control.Concurrent.Chan.Class   --- TODO: test performance of this with and without fmaped / cofmaped values in+-- TODO: test performance of this with and without fmaped / contramap values in -- comparison with standard Chan. Test to see if we can improve performance--- using special constructor for fmaped / cofmaped version+-- using special constructor for fmaped / contramap version   -- | The "write side" of a chan pair@@ -43,8 +43,8 @@     writeList2Chan (InChan f c) = C.writeList2Chan c . map f     readChan (OutChan f c) = f <$> C.readChan c  -instance Cofunctor InChan where-    cofmap f' (InChan f c) = InChan (f . f') c+instance Contravariant InChan where+    contramap f' (InChan f c) = InChan (f . f') c  instance Functor OutChan where     fmap f' (OutChan f c) = OutChan (f' . f) c
chan-split.cabal view
@@ -8,11 +8,11 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version:             0.2.0+Version:             0.3.0  -- A short (one-line) description of the package. Synopsis:            Concurrent Chans as read/write pairs. Also provides generic-                     Chan, Cofunctor classes.+                     Chan pair class.  -- A longer description of the package. Description:         A wrapper around Control.Concurrent.Chan that splits a Chan@@ -20,7 +20,7 @@                      other write operations.                       .                      This makes code easier to reason about, allows us to define-                     useful instances ('Functor' and 'Cofunctor') on the chan+                     useful instances ('Functor' and 'Contravariant') on the chan                      pairs.                      .                      In addition this package provides a module that defines a@@ -46,7 +46,7 @@                      /CHANGES/:                      0.1.3 -> 0.2.0   -                        - moved @Data.Cofunctor@ to its own module "cofunctor"+                        - get Cofunctor from "contravariant" package                          - redefine chan pair classes using fundeps                           to express the relationship between input@@ -93,14 +93,14 @@                      -- for the split chan class:   Extensions:          MultiParamTypeClasses                      , FunctionalDependencies -                     -- for Functor / Cofunctor instances:+                     -- for Functor / Contravariant instances:                      , GADTs    Exposed-modules:     Control.Concurrent.Chan.Split                      , Control.Concurrent.Chan.Class      Build-depends:       base >= 4 && < 5-                     , cofunctor+                     , contravariant      ghc-options:        -Wall