-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
59 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Changelog | ||
|
||
## [0.1.0.0] - 6/24/2023 | ||
|
||
- First release of optics-operators. | ||
- Provides only (+=), (-=), (*=), (//=) operators for now. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cabal-version: 1.12 | ||
cabal-version: 1.18 | ||
|
||
-- This file has been generated from package.yaml by hpack version 0.34.7. | ||
-- | ||
|
@@ -8,13 +8,26 @@ name: optics-operators | |
version: 0.1.0.0 | ||
synopsis: A tiny package containing operators missing from the official package. | ||
description: A tiny package containing operators missing from the official package. | ||
Basic example using state operators: | ||
. | ||
> newtype Person = Person { age :: Int } deriving (Show, Generic) | ||
> | ||
> main :: IO () | ||
> main = print <=< flip execStateT (Person 0) $ do | ||
> #age += 50 | ||
> #age -= 20 | ||
> | ||
> -- Output: Person {age = 30} | ||
category: Data, Optics, Lenses | ||
homepage: https://github.com/qwbarch/optics-operators | ||
bug-reports: https://github.com/qwbarch/optics-operators/issues | ||
author: qwbarch | ||
maintainer: qwbarch <[email protected]> | ||
license: MIT | ||
license-file: LICENSE | ||
build-type: Simple | ||
extra-doc-files: | ||
CHANGELOG.md | ||
|
||
library | ||
exposed-modules: | ||
|
@@ -23,7 +36,6 @@ library | |
Paths_optics_operators | ||
hs-source-dirs: | ||
src | ||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing | ||
build-depends: | ||
base >=4.10 && <5 | ||
, mtl ==2.* | ||
|
@@ -38,7 +50,7 @@ executable readme | |
hs-source-dirs: | ||
./ | ||
src | ||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing -pgmL markdown-unlit | ||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing -pgmL markdown-unlit | ||
build-depends: | ||
base >=4.10 && <5 | ||
, mtl ==2.* | ||
|
@@ -54,7 +66,7 @@ test-suite unit-test | |
hs-source-dirs: | ||
src | ||
test | ||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing | ||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -flate-specialise -fspecialise-aggressively -Wall -Wno-name-shadowing | ||
build-depends: | ||
base >=4.10 && <5 | ||
, mtl ==2.* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,26 @@ name: optics-operators | |
version: 0.1.0.0 | ||
license: MIT | ||
license-file: LICENSE | ||
author: qwbarch | ||
maintainer: qwbarch <[email protected]> | ||
category: Data, Optics, Lenses | ||
synopsis: A tiny package containing operators missing from the official package. | ||
description: A tiny package containing operators missing from the official package. | ||
homepage: https://github.com/qwbarch/optics-operators | ||
bug-reports: https://github.com/qwbarch/optics-operators/issues | ||
extra-doc-files: CHANGELOG.md | ||
|
||
synopsis: A tiny package containing operators missing from the official package. | ||
description: | | ||
A tiny package containing operators missing from the official package. | ||
Basic example using state operators: | ||
> newtype Person = Person { age :: Int } deriving (Show, Generic) | ||
> | ||
> main :: IO () | ||
> main = print <=< flip execStateT (Person 0) $ do | ||
> #age += 50 | ||
> #age -= 20 | ||
> | ||
> -- Output: Person {age = 30} | ||
library: | ||
source-dirs: | ||
|
@@ -19,7 +33,15 @@ executables: | |
source-dirs: | ||
- . | ||
- src | ||
ghc-options: -pgmL markdown-unlit | ||
ghc-options: | ||
- -threaded | ||
- -rtsopts | ||
- -with-rtsopts=-N | ||
- -flate-specialise | ||
- -fspecialise-aggressively | ||
- -Wall | ||
- -Wno-name-shadowing | ||
- -pgmL markdown-unlit | ||
|
||
tests: | ||
unit-test: | ||
|
@@ -30,16 +52,14 @@ tests: | |
dependencies: | ||
- tasty >= 1.4.3 && < 1.5 | ||
- tasty-quickcheck >= 0.10.2 && < 0.11 | ||
|
||
ghc-options: | ||
- -threaded | ||
- -rtsopts | ||
- -with-rtsopts=-N | ||
- -O2 | ||
- -flate-specialise | ||
- -fspecialise-aggressively | ||
- -Wall | ||
- -Wno-name-shadowing | ||
ghc-options: | ||
- -threaded | ||
- -rtsopts | ||
- -with-rtsopts=-N | ||
- -flate-specialise | ||
- -fspecialise-aggressively | ||
- -Wall | ||
- -Wno-name-shadowing | ||
|
||
dependencies: | ||
- base >= 4.10 && < 5 | ||
|