packages feed

data-diverse-lens 0.4.0.1 → 0.5.0.0

raw patch · 4 files changed

+26/−13 lines, 4 filesdep ~data-diversedep ~lensPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: data-diverse, lens

API changes (from Hackage documentation)

- Data.Diverse.Lens.Many: itemL :: forall l x xs proxy. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Lens' (Many xs) x
+ Data.Diverse.Lens.Many: itemL :: forall l xs proxy x. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Lens' (Many xs) x
- Data.Diverse.Lens.Many: itemL' :: forall l x y xs proxy. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Lens (Many xs) (Many (Replace x y xs)) x y
+ Data.Diverse.Lens.Many: itemL' :: forall l y xs proxy x. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Lens (Many xs) (Many (Replace x y xs)) x y
- Data.Diverse.Lens.Many: itemN :: forall n x xs proxy. MemberAt n x xs => proxy n -> Lens' (Many xs) x
+ Data.Diverse.Lens.Many: itemN :: forall n xs proxy x. MemberAt n x xs => proxy n -> Lens' (Many xs) x
- Data.Diverse.Lens.Many: itemN' :: forall n x y xs proxy. MemberAt n x xs => proxy n -> Lens (Many xs) (Many (ReplaceIndex n y xs)) x y
+ Data.Diverse.Lens.Many: itemN' :: forall n y xs proxy x. MemberAt n x xs => proxy n -> Lens (Many xs) (Many (ReplaceIndex n y xs)) x y
- Data.Diverse.Lens.Which: facetL :: forall l x xs proxy. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Prism' (Which xs) x
+ Data.Diverse.Lens.Which: facetL :: forall l xs proxy x. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Prism' (Which xs) x
- Data.Diverse.Lens.Which: facetN :: forall n x xs proxy. (MemberAt n x xs) => proxy n -> Prism' (Which xs) x
+ Data.Diverse.Lens.Which: facetN :: forall n xs proxy x. (MemberAt n x xs) => proxy n -> Prism' (Which xs) x

Files

README.md view
@@ -8,6 +8,13 @@  # Changelog +* 0.5.0.0+  - min bounds: data-diverse >=1.2.1+  - Rerranged type variable for xxxL and xxxN functions so that the+    @x@ inferrred from label @l@ or index @n@ is after @proxy@.+    - This affects `item[L|N]`, `item[L|N]'`, `replace[L|N]'`, `facet[L|N]`+    - Same change was made in data-diverse-1.2.0.0+ * 0.4.0.1   - included data-diverse 1.0 in the upper bounds 
data-diverse-lens.cabal view
@@ -1,5 +1,5 @@ name:                data-diverse-lens-version:             0.4.0.1+version:             0.5.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.@@ -13,7 +13,7 @@ build-type:          Simple extra-source-files:  README.md cabal-version:       >=1.10-tested-with:         GHC == 8.0.2+tested-with:         GHC == 8.0.2, GHC == 8.2.1  library   hs-source-dirs:      src@@ -21,9 +21,12 @@                        Data.Diverse.Lens.Many                        Data.Diverse.Lens.Which   build-depends:       base >= 4.7 && < 5-                     , data-diverse >= 0.10 && < 2-                     , lens >= 4 && < 5+                     , data-diverse >= 1.2.0.1 && < 2                      , tagged >= 0.8.5 && < 1+  if impl(ghc >= 8.2.0)+    build-depends: lens >= 4.15.2 && < 5+  else+    build-depends: lens >= 4 && < 5   ghc-options:         -Wall   default-language:    Haskell2010 @@ -34,11 +37,14 @@   other-modules:       Data.Diverse.Lens.ManySpec                        Data.Diverse.Lens.WhichSpec   build-depends:       base-                     , data-diverse >= 0.10 && < 2+                     , data-diverse >= 1.2.0.1 && < 2                      , data-diverse-lens                      , hspec >= 2 && < 3-                     , lens >= 4 && < 5                      , tagged >= 0.8.5 && < 1+  if impl(ghc >= 8.2.0)+    build-depends: lens >= 4.15.2 && < 5+  else+    build-depends: lens >= 4 && < 5   ghc-options:         -threaded -rtsopts -with-rtsopts=-N -Wall   default-language:    Haskell2010 
src/Data/Diverse/Lens/Many.hs view
@@ -68,7 +68,7 @@ -- x '^.' 'itemL' \@Foo Proxy \`shouldBe` Tagged \@Foo False -- (x '&' 'itemL' \@Foo Proxy '.~' Tagged \@Foo True) \`shouldBe` (5 :: Int) './' Tagged \@Foo True './' Tagged \@Bar \'X' './' 'nil' -- @-itemL :: forall l x xs proxy. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Lens' (Many xs) x+itemL :: forall l xs proxy x. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Lens' (Many xs) x itemL p = lens (fetchL p) (replaceL p)  -- | Polymorphic version of 'itemL'@@ -77,7 +77,7 @@ -- let x = (5 :: Int) './' Tagged @Foo False './' Tagged \@Bar \'X' './' 'nil' -- (x '&' itemL' \@Foo Proxy '.~' \"foo") \`shouldBe` (5 :: Int) './' \"foo" './' Tagged \@Bar \'X' './' 'nil' -- @-itemL' :: forall l x y xs proxy. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Lens (Many xs) (Many (Replace x y xs)) x y+itemL' :: forall l y xs proxy x. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Lens (Many xs) (Many (Replace x y xs)) x y itemL' p = lens (fetchL p) (replaceL' p)  @@ -88,13 +88,13 @@ -- x '^.' 'itemN' (Proxy \@0) \`shouldBe` 5 -- (x '&' 'itemN' (Proxy @0) '.~' 6) \`shouldBe` (6 :: Int) './' False './' \'X' './' Just \'O' './' (6 :: Int) './' Just \'A' './' 'nil' -- @-itemN ::  forall n x xs proxy. MemberAt n x xs => proxy n -> Lens' (Many xs) x+itemN ::  forall n xs proxy x. MemberAt n x xs => proxy n -> Lens' (Many xs) x itemN p = lens (fetchN p) (replaceN p)   -- | Polymorphic version of 'itemN'-itemN' ::  forall n x y xs proxy. MemberAt n x xs => proxy n -> Lens (Many xs) (Many (ReplaceIndex n y xs)) x y-itemN' p = lens (fetchN p) (replaceN' @n @x @y p)+itemN' ::  forall n y xs proxy x. MemberAt n x xs => proxy n -> Lens (Many xs) (Many (ReplaceIndex n y xs)) x y+itemN' p = lens (fetchN p) (replaceN' @n @y p)  ----------------------------------------------------------------------- 
src/Data/Diverse/Lens/Which.hs view
@@ -44,7 +44,7 @@ --     x = 'preview' ('facetL' \@Bar Proxy) y -- x \`shouldBe` (Just (Tagged 5)) -- @-facetL :: forall l x xs proxy. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Prism' (Which xs) x+facetL :: forall l xs proxy x. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Prism' (Which xs) x facetL p = prism' (pickL p) (trialL' p)  -- | 'pickN' ('review' 'facetN') and 'trialN' ('preview' 'facetN') in 'Prism'' form.@@ -58,7 +58,7 @@ --     x = 'preview' ('facetN' (Proxy \@4)) y -- 'trialN' -- x \`shouldBe` (Just 5) -- @-facetN :: forall n x xs proxy. (MemberAt n x xs) => proxy n -> Prism' (Which xs) x+facetN :: forall n xs proxy x. (MemberAt n x xs) => proxy n -> Prism' (Which xs) x facetN p = prism' (pickN p) (trialN' p)  ------------------------------------------------------------------