1- cabal-version : 1.12
1+ cabal-version : 1.18
22
33-- This file has been generated from package.yaml by hpack version 0.34.7.
44--
@@ -8,13 +8,26 @@ name: optics-operators
88version : 0.1.0.0
99synopsis : A tiny package containing operators missing from the official package.
1010description : A tiny package containing operators missing from the official package.
11+ Basic example using state operators :
12+ .
13+ > newtype Person = Person { age : : Int } deriving (Show, Generic)
14+ >
15+ > main : : IO ()
16+ > main = print <=< flip execStateT (Person 0) $ do
17+ > #age += 50
18+ > #age -= 20
19+ >
20+ > -- Output: Person {age = 30}
1121category : Data, Optics, Lenses
1222homepage : https://github.com/qwbarch/optics-operators
1323bug-reports : https://github.com/qwbarch/optics-operators/issues
24+ author : qwbarch
1425maintainer : qwbarch <qwbarch@gmail.com>
1526license : MIT
1627license-file : LICENSE
1728build-type : Simple
29+ extra-doc-files :
30+ CHANGELOG.md
1831
1932library
2033 exposed-modules :
@@ -23,7 +36,6 @@ library
2336 Paths_optics_operators
2437 hs-source-dirs :
2538 src
26- ghc-options : -threaded -rtsopts -with-rtsopts=-N -O2 -flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing
2739 build-depends :
2840 base >= 4.10 && < 5
2941 , mtl == 2. *
@@ -38,7 +50,7 @@ executable readme
3850 hs-source-dirs :
3951 ./
4052 src
41- ghc-options : -threaded -rtsopts -with-rtsopts=-N -O2 - flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing -pgmL markdown-unlit
53+ ghc-options : -threaded -rtsopts -with-rtsopts=-N -flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing -pgmL markdown-unlit
4254 build-depends :
4355 base >= 4.10 && < 5
4456 , mtl == 2. *
@@ -54,7 +66,7 @@ test-suite unit-test
5466 hs-source-dirs :
5567 src
5668 test
57- ghc-options : -threaded -rtsopts -with-rtsopts=-N -O2 - flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing
69+ ghc-options : -threaded -rtsopts -with-rtsopts=-N -flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing
5870 build-depends :
5971 base >= 4.10 && < 5
6072 , mtl == 2. *
0 commit comments