polysemy-optics: Optics for Polysemy.

[ bsd2, lenses, library, optics ] [ Propose Tags ]

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.14), optics (>=0.1 && <0.4), polysemy (>=0.4 && <1.4), polysemy-zoo (>=0.6 && <0.8) [details]
License BSD-2-Clause
Copyright 2020 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 2020-07-25T21:29:22Z
Distributions
Downloads 347 total (11 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-07-25 [all 1 reports]

Readme for polysemy-optics-0.1.0.0

[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.