lens-tutorial 1.0.1 → 1.0.2
raw patch · 2 files changed
+4/−4 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- lens-tutorial.cabal +2/−2
- src/Control/Lens/Tutorial.hs +2/−2
lens-tutorial.cabal view
@@ -1,5 +1,5 @@ Name: lens-tutorial-Version: 1.0.1+Version: 1.0.2 Cabal-Version: >=1.10 Build-Type: Simple License: BSD3@@ -37,5 +37,5 @@ GHC-Options: -O2 -Wall Default-Language: Haskell2010 Build-Depends:- base ,+ base < 5 , doctest >= 0.9.12 && < 0.11
src/Control/Lens/Tutorial.hs view
@@ -262,7 +262,7 @@ However, sometimes Template Haskell is not an option, so we can also use the `lens` utility function to build lenses. This utility has type: -> lens :: (a -> b) -> (b -> a -> a) -> Lens' a b+> lens :: (a -> b) -> (a -> b -> a) -> Lens' a b The first argument is a \"getter\" (a way to extract a @\'b\'@ from an @\'a\'@). The second argument is a \"setter\" (given a @b@, update an@@ -270,7 +270,7 @@ use `lens` like this: > point :: Lens' Atom Point-> point = lens _point (\newPoint atom -> atom { _point = newPoint })+> point = lens _point (\atom newPoint -> atom { _point = newPoint }) You can even define lenses without incurring a dependency on the @lens@ library. Remember that lenses are just higher-order functions over