packages feed

data-diverse-lens 4.1.0.0 → 4.2.0.0

raw patch · 3 files changed

+8/−11 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Data.Diverse.Profunctor.Which: also :: (Semigroup (f (Which a3)), Functor f, ChooseBoth a1 a2 a3) => f (Which a1) -> f (Which a2) -> f (Which a3)
- Data.Diverse.Profunctor.Which: alternatively :: (Alternative f, ChooseBoth a1 a2 a3) => f (Which a1) -> f (Which a2) -> f (Which a3)
- Data.Diverse.Profunctor.Which: infixl 3 `alternatively`
+ Data.Diverse.Profunctor.Which: chooseWith :: (Semigroup (f (Which a3)), Functor f, ChooseBoth a1 a2 a3) => (f (Which a3) -> f (Which a3) -> f (Which a3)) -> f (Which a1) -> f (Which a2) -> f (Which a3)
- Data.Diverse.Profunctor.Which: infixr 6 `also`
+ Data.Diverse.Profunctor.Which: infixr 6 `chooseWith`

Files

README.md view
@@ -7,6 +7,9 @@  # Changelog +* 4.2.0.0+  - Replaced `also` and `alternatively` with `chooseWith`+ * 4.1.0.0   - Removed generic-lens dependency - didn't really use it. 
data-diverse-lens.cabal view
@@ -1,5 +1,5 @@ name:                data-diverse-lens-version:             4.1.0.0+version:             4.2.0.0 synopsis:            Isos & Lens for Data.Diverse.Many and Prisms for Data.Diverse.Which description:         Isos & Lens for Data.Diverse.Many and Prisms for Data.Diverse.Which                      Refer to [ManySpec.hs](https://github.com/louispan/data-diverse-lens/blob/master/test/Data/Diverse/Lens/ManySpec.hs) and [WhichSpec.hs](https://github.com/louispan/data-diverse-lens/blob/master/test/Data/Diverse/Lens/WhichSpec.hs) for example usages.
src/Data/Diverse/Profunctor/Which.hs view
@@ -23,14 +23,12 @@     , chooseBetweenK     , thenChoose     , thenChooseK-    , also-    , alternatively+    , chooseWith     -- , (+||+)     -- , (>||>)     -- , (<||<)     ) where -import Control.Applicative import Control.Arrow import qualified Control.Category as C import Control.Lens@@ -207,11 +205,7 @@  ------------------------------------------ -also :: (Semigroup (f (Which a3)), Functor f, ChooseBoth a1 a2 a3) => f (Which a1) -> f (Which a2) -> f (Which a3)-also x y = (diversify <$> x) <> (diversify <$> y)-infixr 6 `also` -- like mappend--alternatively :: (Alternative f, ChooseBoth a1 a2 a3) => f (Which a1) -> f (Which a2) -> f (Which a3)-alternatively x y = (diversify <$> x) <|> (diversify <$> y)-infixl 3 `alternatively` -- like <|>+chooseWith :: (Semigroup (f (Which a3)), Functor f, ChooseBoth a1 a2 a3) => (f (Which a3) -> f (Which a3) -> f (Which a3)) -> f (Which a1) -> f (Which a2) -> f (Which a3)+chooseWith f x y = (diversify <$> x) `f` (diversify <$> y)+infixr 6 `chooseWith` -- like mappend