@hackage polysemy-optics0.1.0.2
Optics for Polysemy.
Categories
License
BSD-2-Clause
Maintainer
coltharp@pdx.edu
Links
Versions
Installation
Dependencies (4)
- base >=4.12 && <4.17
- optics >=0.1 && <0.5
- polysemy >=0.4 && <1.8
- polysemy-zoo >=0.6 && <0.9 Show all…
Dependents (0)
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
zoomorzoomMaybeto go fromState stoState a, the originalState swill still be present in your effect stack. Writes to the zoomed part of theswill be visible from inside theState a, and vice-versa. zoomManycannot 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
magnifyfunctions.