lens-family 2.1.0 → 2.1.1
raw patch · 5 files changed
+23/−18 lines, 5 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Lens.Family2: data Constant a (b :: k) :: forall k. () => Type -> k -> Type
- Lens.Family2.State.Lazy: data Constant a (b :: k) :: forall k. () => Type -> k -> Type
- Lens.Family2.State.Strict: data Constant a (b :: k) :: forall k. () => Type -> k -> Type
- Lens.Family2.Stock: data Backwards (f :: k -> Type) (a :: k) :: forall k. () => k -> Type -> k -> Type
+ Lens.Family2: data Constant a (b :: k)
+ Lens.Family2.State.Lazy: data Constant a (b :: k)
+ Lens.Family2.State.Strict: data Constant a (b :: k)
+ Lens.Family2.Stock: data Backwards (f :: k -> Type) (a :: k)
- Lens.Family2: (&) :: () => s -> (s -> t) -> t
+ Lens.Family2: (&) :: s -> (s -> t) -> t
- Lens.Family2: (^.) :: () => s -> FoldLike a s t a b -> a
+ Lens.Family2: (^.) :: s -> FoldLike a s t a b -> a
- Lens.Family2: review :: () => GrateLike (Constant () :: Type -> Type) s t a b -> b -> t
+ Lens.Family2: review :: GrateLike (Constant () :: Type -> Type) s t a b -> b -> t
- Lens.Family2: type FoldLike r s t a b = LensLike (Constant r :: Type -> Type) s t a b
+ Lens.Family2: type FoldLike r s t a b = LensLike Constant r :: Type -> Type s t a b
- Lens.Family2: type FoldLike' r s a = LensLike' (Constant r :: Type -> Type) s a
+ Lens.Family2: type FoldLike' r s a = LensLike' Constant r :: Type -> Type s a
- Lens.Family2: view :: () => FoldLike a s t a b -> s -> a
+ Lens.Family2: view :: FoldLike a s t a b -> s -> a
- Lens.Family2: views :: () => FoldLike r s t a b -> (a -> r) -> s -> r
+ Lens.Family2: views :: FoldLike r s t a b -> (a -> r) -> s -> r
- Lens.Family2.State.Lazy: type FoldLike r s t a b = LensLike (Constant r :: Type -> Type) s t a b
+ Lens.Family2.State.Lazy: type FoldLike r s t a b = LensLike Constant r :: Type -> Type s t a b
- Lens.Family2.State.Lazy: zoom :: Monad m => LensLike' (Zooming m c) s a -> StateT a m c -> StateT s m c
+ Lens.Family2.State.Lazy: zoom :: forall (m :: Type -> Type) c s a. Monad m => LensLike' (Zooming m c) s a -> StateT a m c -> StateT s m c
- Lens.Family2.State.Strict: type FoldLike r s t a b = LensLike (Constant r :: Type -> Type) s t a b
+ Lens.Family2.State.Strict: type FoldLike r s t a b = LensLike Constant r :: Type -> Type s t a b
- Lens.Family2.State.Strict: zoom :: Monad m => LensLike' (Zooming m c) s a -> StateT a m c -> StateT s m c
+ Lens.Family2.State.Strict: zoom :: forall (m :: Type -> Type) c s a. Monad m => LensLike' (Zooming m c) s a -> StateT a m c -> StateT s m c
- Lens.Family2.Stock: backwards :: () => LensLike (Backwards f) s t a b -> LensLike f s t a b
+ Lens.Family2.Stock: backwards :: LensLike (Backwards f) s t a b -> LensLike f s t a b
Files
- CHANGELOG +4/−0
- lens-family.cabal +4/−3
- src/Lens/Family2.hs +2/−2
- src/Lens/Family2/Stock.hs +7/−7
- src/Lens/Family2/Unchecked.hs +6/−6
CHANGELOG view
@@ -1,3 +1,7 @@+2.1.1 (Changes from 2.1.0)+==========================+This release makes the library forwards compatable with GHC 9.+ 2.1.0 (Changes from 2.0.0) ========================== This release makes some minor name changes to functions.
lens-family.cabal view
@@ -1,8 +1,8 @@ name: lens-family category: Data, Lenses-version: 2.1.0+version: 2.1.1 license: BSD3-cabal-version: >= 1.6+cabal-version: >= 1.10 license-file: LICENSE author: Russell O'Connor maintainer: Russell O'Connor <roconnor@theorem.ca>@@ -40,7 +40,8 @@ location: https://hub.darcs.net/roconnor/lens-family library- extensions: Rank2Types+ default-language: Haskell2010+ other-extensions: Rank2Types build-depends: base >= 4.11 && < 5, containers >= 0.5.8 && < 0.7,
src/Lens/Family2.hs view
@@ -193,13 +193,13 @@ -- >>> (3 :+ 4, "example")^._1.to(abs) -- 5.0 :+ 0.0 to :: (s -> a) -> Getter s t a b-to = LF.to+to sa = LF.to sa -- | 'folding' promotes a \"toList\" function to a read-only traversal called a fold. -- -- To demote a traversal or fold to a \"toList\" function use the section @(^..l)@ or @toListOf l@. folding :: Foldable f => (s -> f a) -> Fold s t a b-folding = LF.folding+folding sa = LF.folding sa -- | Returns a list of all of the referenced values in order. toListOf :: Fold s t a b -> s -> [a]
src/Lens/Family2/Stock.hs view
@@ -76,31 +76,31 @@ -- | Lens on a given point of a function. ix :: Eq k => k -> Lens' (k -> v) v-ix = Stock.ix+ix k = Stock.ix k -- | Lens on a given point of a 'Map.Map'. at :: Ord k => k -> Lens' (Map.Map k v) (Maybe v)-at = Stock.at+at k = Stock.at k -- | Lens on a given point of a 'IntMap.IntMap'. intAt :: Int -> Lens' (IntMap.IntMap v) (Maybe v)-intAt = Stock.intAt+intAt i = Stock.intAt i -- | Lens providing strict access to a given point of a 'Map.Map'. at' :: Ord k => k -> Lens' (Map.Map k v) (Maybe v)-at' = Stock.at'+at' k = Stock.at' k -- | Lens providing strict access to a given point of a 'IntMap.IntMap'. intAt' :: Int -> Lens' (IntMap.IntMap v) (Maybe v)-intAt' = Stock.intAt'+intAt' i = Stock.intAt' i -- | Lens on a given point of a 'Set.Set'. contains :: Ord k => k -> Lens' (Set.Set k) Bool-contains = Stock.contains+contains k = Stock.contains k -- | Lens on a given point of a 'IntSet.IntSet'. intContains :: Int -> Lens' IntSet.IntSet Bool-intContains = Stock.intContains+intContains i = Stock.intContains i -- | A grate accessing the codomain of a function. cod :: Grate (r -> a) (r -> b) a b
src/Lens/Family2/Unchecked.hs view
@@ -242,7 +242,7 @@ adapter :: (s -> a) -- ^ yin -> (b -> t) -- ^ yang -> Adapter s t a b-adapter = LF.adapter+adapter sa bt = LF.adapter sa bt -- | Build a lens from a @getter@ and @setter@ family. --@@ -256,7 +256,7 @@ lens :: (s -> a) -- ^ getter -> (s -> b -> t) -- ^ setter -> Lens s t a b-lens = LF.lens+lens sa sbt = LF.lens sa sbt grate :: (((s -> a) -> b) -> t) -- ^ grater -> Grate s t a b@@ -269,7 +269,7 @@ -- * @grater (\k -> h (k . grater)) === grater (\k -> h ($ k))@ -- -- Note: The grater laws are that of an algebra for the parameterised continuation monad, `Lens.Family.PCont`.-grate = LF.grate+grate sabt = LF.grate sabt -- | Build a prism from a @matcher@ and @reviewer@ family. --@@ -283,7 +283,7 @@ prism :: (s -> Either t a) -- ^ matcher -> (b -> t) -- ^ reviewer -> Prism s t a b-prism = LF.prism+prism sta bt = LF.prism sta bt -- | 'setting' promotes a \"semantic editor combinator\" to a modify-only lens. -- To demote a lens to a semantic edit combinator, use the section @(l %~)@ or @over l@ from "Lens.Family2".@@ -298,7 +298,7 @@ -- * @sec f . sec g === sec (f . g)@ setting :: ((a -> b) -> s -> t) -- ^ sec (semantic editor combinator) -> Setter s t a b-setting = LF.setting+setting abst = LF.setting abst -- | 'resetting' promotes a \"semantic editor combinator\" to a form of grate that can only lift unary functions. -- To demote a grate to a semantic edit combinator, use @under l@ from "Lens.Family2".@@ -310,4 +310,4 @@ -- * @sec f . sec g === sec (f . g)@ resetting :: ((a -> b) -> s -> t) -- ^ sec (semantic editor combinator) -> Resetter s t a b-resetting = LF.resetting+resetting abst = LF.resetting abst