packages feed

data-diverse-lens 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+1/−22 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

data-diverse-lens.cabal view
@@ -1,5 +1,5 @@ name:                data-diverse-lens-version:             0.1.0.0+version:             0.1.1.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/Lens/Many.hs view
@@ -39,12 +39,10 @@ -- | @_Many = iso fromMany toMany@ _Many :: IsMany t xs a => Iso' (Many xs) (t xs a) _Many = iso fromMany toMany-{-# INLINE _Many #-}  -- | @_Many' = iso fromMany' toMany'@ _Many' :: IsMany Tagged xs a => Iso' (Many xs) a _Many' = iso fromMany' toMany'-{-# INLINE _Many' #-}  ----------------------------------------------------------------------- @@ -57,12 +55,10 @@ -- @ item :: forall x xs. UniqueMember x xs => Lens' (Many xs) x item = lens fetch replace-{-# INLINE item #-}  -- | Polymorphic version of 'item' item' :: forall x y xs. UniqueMember x xs => Lens (Many xs) (Many (Replace x y xs)) x y item' = lens fetch (replace' @x @y Proxy)-{-# INLINE item' #-}   -- | 'fetchL' ('view' 'itemL') and 'replaceL' ('set' 'itemL') in 'Lens'' form.@@ -74,7 +70,6 @@ -- @ itemL :: forall l xs x proxy. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Lens' (Many xs) x itemL p = lens (fetchL p) (replaceL p)-{-# INLINE itemL #-}  -- | Polymorphic version of 'itemL' --@@ -84,7 +79,6 @@ -- @ itemL' :: forall l y xs x proxy. (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)-{-# INLINE itemL' #-}   -- | 'fetchN' ('view' 'item') and 'replaceN' ('set' 'item') in 'Lens'' form.@@ -96,13 +90,11 @@ -- @ itemN ::  forall n x xs proxy. MemberAt n x xs => proxy n -> Lens' (Many xs) x itemN p = lens (fetchN p) (replaceN p)-{-# INLINE itemN #-}   -- | 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)-{-# INLINE itemN' #-}  ----------------------------------------------------------------------- @@ -123,7 +115,6 @@        (Select smaller larger, Amend smaller larger)     => Lens' (Many larger) (Many smaller) project = lens select amend-{-# INLINE project #-}  -- | Polymorphic version of project' project'@@ -131,7 +122,6 @@        (Select smaller larger, Amend' smaller smaller' larger zipped)     => Lens (Many larger) (Many (Replaces smaller smaller' larger)) (Many smaller) (Many smaller') project' = lens select (amend' @smaller @smaller' Proxy)-{-# INLINE project' #-}  -- | 'selectL' ('view' 'projectL') and 'amendL' ('set' 'projectL') in 'Lens'' form. --@@ -150,7 +140,6 @@        , UniqueLabels ls larger)     => proxy ls -> Lens' (Many larger) (Many smaller) projectL p = lens (selectL p) (amendL p)-{-# INLINE projectL #-}  -- | Polymorphic version of projectL' --@@ -168,7 +157,6 @@        , UniqueLabels ls larger)     => proxy ls -> Lens (Many larger) (Many (Replaces smaller smaller' larger)) (Many smaller) (Many smaller') projectL' p = lens (selectL p) (amendL' p)-{-# INLINE projectL' #-}  -- | 'selectN' ('view' 'projectN') and 'amendN' ('set' 'projectN') in 'Lens'' form. --@@ -187,7 +175,6 @@        (SelectN ns smaller larger, AmendN ns smaller larger)     => proxy ns -> Lens' (Many larger) (Many smaller) projectN p = lens (selectN p) (amendN p)-{-# INLINE projectN #-}  -- | Polymorphic version of 'projectN' projectN'@@ -195,4 +182,3 @@        (SelectN ns smaller larger, AmendN' ns smaller smaller' larger zipped)     => proxy ns -> Lens (Many larger) (Many (ReplacesIndex ns smaller' larger)) (Many smaller) (Many smaller') projectN' p = lens (selectN p) (amendN' p)-{-# INLINE projectN' #-}
src/Data/Diverse/Lens/Which.hs view
@@ -42,7 +42,6 @@ -- @ facet :: forall x xs. (UniqueMember x xs) => Prism' (Which xs) x facet = prism' pick (hush . trial)-{-# INLINE facet #-}  -- | 'pickL' ('review' 'facetL') and 'trialL' ('preview' 'facetL') in 'Prism'' form. --@@ -53,7 +52,6 @@ -- @ facetL :: forall l xs x proxy. (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => proxy l -> Prism' (Which xs) x facetL p = prism' (pickL p) (hush . trialL p)-{-# INLINE facetL #-}  -- | 'pickN' ('review' 'facetN') and 'trialN' ('preview' 'facetN') in 'Prism'' form. --@@ -68,7 +66,6 @@ -- @ facetN :: forall n xs x proxy. (MemberAt n x xs) => proxy n -> Prism' (Which xs) x facetN p = prism' (pickN p) (hush . trialN p)-{-# INLINE facetN #-}  ------------------------------------------------------------------ @@ -89,9 +86,7 @@        )     => Prism' (Which tree) (Which branch) inject = prism' diversify (hush . reinterpret)-{-# INLINE inject #-} - -- | 'diversifyL' ('review' 'injectL') and 'reinterpretL' ('preview' 'injectL') in 'Prism'' form. -- -- @@@ -112,7 +107,6 @@        )     => proxy ls -> Prism' (Which tree) (Which branch) injectL p = prism' (diversifyL p) (hush . reinterpretL p)-{-# INLINE injectL #-}  -- | 'diversifyN' ('review' 'injectN') and 'reinterpretN' ('preview' 'injectN') in 'Prism'' form. --@@ -130,4 +124,3 @@        )     => proxy indices -> Prism' (Which tree) (Which branch) injectN p = prism' (diversifyN p) (reinterpretN p)-{-# INLINE injectN #-}