fused-effects-optics 0.2.0.0 → 0.2.1.0
raw patch · 4 files changed
+18/−6 lines, 4 filesdep ~basedep ~optics-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, optics-core
API changes (from Hackage documentation)
+ Control.Effect.Optics: (<~) :: (Is k A_Setter, Has (State s) sig m) => Optic k is s s a b -> m b -> m ()
Files
- CHANGELOG.md +6/−1
- README.md +1/−1
- fused-effects-optics.cabal +6/−4
- src/Control/Effect/Optics.hs +5/−0
CHANGELOG.md view
@@ -3,7 +3,12 @@ `fused-effects-optics` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. -## 0.0.2.0+## 0.2.1.0++* GHC 9.2 support.+* Add `<~` operator.++## 0.2.0.0 * GHC 9 support. * Add `Control.Effect.Optics.Indexed` module.
README.md view
@@ -2,7 +2,7 @@ [](https://hackage.haskell.org/package/fused-effects-optics) [](LICENSE)-[](https://github.com/fused-effects/fused-effects-optics/actions)+[](https://github.com/fused-effects/fused-effects-optics/actions) This package provides an interface to the [`optics`](https://github.com/well-typed/optics) library compatible with [`fused-effects`](https://github.com/robrix/fused-effects). The combinators provided by `optics-extra` for operating in monadic contexts—`gview`, `use`, `.=`, &c.—rely on `mtl` for `MonadState` and `MonadReader`, which is not applicable to `Reader` and `State` effects.
fused-effects-optics.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: fused-effects-optics-version: 0.2.0.0+version: 0.2.1.0 synopsis: Bridge between the optics and fused-effects ecosystems. description: Provides combinators for the optics-based manipulation of state and context types provided by the fused-effects library, similar to those provided by optics-extra for mtl-based monad transformers. homepage: https://github.com/fused-effects/fused-effects-optics@@ -9,13 +9,15 @@ license-file: LICENSE author: Patrick Thomson maintainer: patrick.william.thomson@gmail.com-copyright: 2020 Patrick Thomson+copyright: 2020-2021 Patrick Thomson category: Control build-type: Simple extra-doc-files: README.md , CHANGELOG.md tested-with: GHC == 8.8.3 GHC == 8.10.1+ GHC == 9.0+ GHC == 9.2 source-repository head type: git@@ -27,9 +29,9 @@ Control.Effect.Optics.Indexed - build-depends: base >= 4.12 && < 4.16+ build-depends: base >= 4.12 && < 5 , fused-effects >= 1 && < 1.2- , optics-core >= 0.3+ , optics-core == 0.* ghc-options: -Wall -Wincomplete-uni-patterns
src/Control/Effect/Optics.hs view
@@ -20,6 +20,7 @@ (.=), (?=), (%=),+ (<~), ) where @@ -174,3 +175,7 @@ m () (%=) = modifying {-# INLINE (%=) #-}++-- | Run the provided monadic action and assign it to the target of a 'Setter'.+(<~) :: (Is k A_Setter, Has (State s) sig m) => Optic k is s s a b -> m b -> m ()+l <~ mb = mb >>= assign l