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]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,
Change log CHANGELOG.md
Dependencies base (>=4.12 && <4.15), optics (>=0.1 && <0.4), polysemy (>=0.4 && <1.5), 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 2021-06-18T07:25:59Z
Downloads 371 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-06-18 [all 1 reports]

Readme for polysemy-optics-

[back to package description]


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


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.