packages feed

data-diverse-lens 4.2.0.0 → 4.2.0.1

raw patch · 3 files changed

+6/−5 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- 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: chooseWith :: (Functor f, ChooseBoth a1 a2 a3) => (f (Which a3) -> f (Which a3) -> f (Which a3)) -> f (Which a1) -> f (Which a2) -> f (Which a3)

Files

README.md view
@@ -7,6 +7,9 @@  # Changelog +* 4.2.0.1+  - Missed removing Semigroup constraint from `chooseWith`+ * 4.2.0.0   - Replaced `also` and `alternatively` with `chooseWith` 
data-diverse-lens.cabal view
@@ -1,5 +1,5 @@ name:                data-diverse-lens-version:             4.2.0.0+version:             4.2.0.1 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
@@ -1,5 +1,3 @@-{-# OPTIONS_GHC -Wno-redundant-constraints #-}- {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-}@@ -33,7 +31,6 @@ import qualified Control.Category as C import Control.Lens import Data.Diverse.Lens-import Data.Semigroup  -- | A friendlier constraint synonym for 'faceted'. type Faceted a as x b bs y =@@ -205,7 +202,8 @@  ------------------------------------------ -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 :: (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