Reflections on Monadic Lenses
Faris Abou-Saleh, James Cheney, Jeremy Gibbons, James McKinna, and, Perdita Stevens

TL;DR
This paper reviews existing monadic lens formulations for bidirectional transformations, discusses challenges in incorporating effects, and proposes improved definitions to address these complexities.
Contribution
It provides a critical review of monadic lenses, identifies obstacles in adding effects, and offers refined definitions to better handle effects in bidirectional transformations.
Findings
Identifies issues with naive monadic lens definitions
Highlights subtleties in symmetric transformations with effects
Proposes improved monadic lens definitions
Abstract
Bidirectional transformations (bx) have primarily been modeled as pure functions, and do not account for the possibility of the side-effects that are available in most programming languages. Recently several formulations of bx that use monads to account for effects have been proposed, both among practitioners and in academic research. The combination of bx with effects turns out to be surprisingly subtle, leading to problems with some of these proposals and increasing the complexity of others. This paper reviews the proposals for monadic lenses to date, and offers some improved definitions, paying particular attention to the obstacles to naively adding monadic effects to existing definitions of pure bx such as lenses and symmetric lenses, and the subtleties of equivalence of symmetric bidirectional transformations in the presence of effects.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
