packages feed

lens 3.0 → 3.0.1

raw patch · 4 files changed

+17/−7 lines, 4 files

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+3.0.1+-----+* Added `Control.Lens.Type.simple`.+ 3.0 --- * Added `Control.Lens.Zipper`.
README.markdown view
@@ -47,7 +47,7 @@ ```  ```haskell-ghci> set (_2._1) 42 ("hello","world")+ghci> set (_2._1) 42 ("hello",("world","!!!")) ("hello",(42,"!!!")) ``` @@ -72,7 +72,7 @@ ("hello","world) ``` -Conversely `view`, can be used as an infix alias for `(^.)`.+Conversely `view`, can be used as a prefix alias for `(^.)`.  ```haskell ghci> view _2 (10,20)
lens.cabal view
@@ -1,6 +1,6 @@ name:          lens category:      Data, Lenses-version:       3.0+version:       3.0.1 license:       BSD3 cabal-version: >= 1.8 license-file:  LICENSE
src/Control/Lens/Type.hs view
@@ -31,8 +31,7 @@ -- -- @type 'Lens' a b c d = forall f. 'Functor' f => (c -> f d) -> a -> f b@ ----- Every 'Lens' is a valid 'Control.Lens.Setter.Setter', choosing @f@ =--- 'Control.Lens.Getter.Mutator'.+-- Every 'Lens' is a valid 'Control.Lens.Setter.Setter'. -- -- Every 'Lens' can be used for 'Control.Lens.Getter.Getting' like a -- 'Control.Lens.Fold.Fold' that doesn't use the 'Applicative' or@@ -60,6 +59,7 @@   , (:->)    , lens+  , simple   , (%%~)   , (%%=) @@ -190,6 +190,12 @@ lens ac adb cfd a = adb a <$> cfd (ac a) {-# INLINE lens #-} +-- | This is occasionally useful when your 'Lens' (or 'Control.Lens.Traversal.Traversal')+-- has a constraint on an unused argument to force that argument to agree with the+-- type of a used argument and avoid @ScopedTypeVariables@ or other ugliness.+simple :: SimpleLensLike f a b -> SimpleLensLike f a b+simple l = l+ ------------------------------------------------------------------------------- -- LensLike -------------------------------------------------------------------------------@@ -536,7 +542,7 @@ -- | Add to the target of a numerically valued 'Lens' into your monad's state -- and return the result. ----- When you do not need the result of the multiplication, ('Control.Lens.Setter.+=') is more+-- When you do not need the result of the addition, ('Control.Lens.Setter.+=') is more -- flexible. -- -- @@@ -550,7 +556,7 @@ -- | Subtract from the target of a numerically valued 'Lens' into your monad's -- state and return the result. ----- When you do not need the result of the multiplication, ('Control.Lens.Setter.-=') is more+-- When you do not need the result of the subtraction, ('Control.Lens.Setter.-=') is more -- flexible. -- -- @