polysemy-optics: Optics for Polysemy.

[ bsd2, lenses, library, optics ] [ Propose Tags ] [ Report a vulnerability ]

Optics for interfacing with Reader, State, and Writer effects in Polysemy.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2
Change log CHANGELOG.md
Dependencies base (>=4.12 && <4.17), optics (>=0.1 && <0.5), polysemy (>=0.4 && <1.8), polysemy-zoo (>=0.6 && <0.9) [details]
License BSD-2-Clause
Copyright 2022 Nicholas Coltharp
Author Nicholas Coltharp
Maintainer coltharp@pdx.edu
Category Optics, Lenses
Bug tracker https://github.com/nosewings/polysemy-optics/issues
Source repo head: git clone https://github.com/nosewings/polysemy-optics
Uploaded by nosewings at 2022-07-05T16:01:00Z
Distributions
Downloads 406 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-07-05 [all 1 reports]

Readme for polysemy-optics-0.1.0.2

[back to package description]

Usage

Simply import Optics.Polysemy. This serves as a drop-in replacement for Optics, Optics.State, and Optics.State.Operators.

Caveats

As best I can tell, the zoom functions cannot currently be translated with complete precision. As a result, only a few zoom functions are present here, and they behave a little strangely.

  • If you use zoom or zoomMaybe to go from State s to State a, the original State s will still be present in your effect stack. Writes to the zoomed part of the s will be visible from inside the State a, and vice-versa.
  • zoomMany cannot be sensibly implemented this way, so I have left it out.
  • Due to difficulties with higher-order effects, I have not yet found a way to implement the magnify functions.