Profunctor Optics and the Yoneda Lemma
Profunctor optics are a neat and composable representation of bidirectional data accessors, including lenses, and their dual, prisms. The profunctor representation exploits higher-order functions and higher-kinded type constructor classes. The relationship between this and the familiar representation in terms of “getter” and “setter” functions is not at all obvious. We derive of the former from the latter, making the relationship clear. It turns out to be a fairly direct application of the Yoneda Lemma, arguably the most important result in category theory. We hope this derivation aids understanding of the profunctor representation. Conversely, it might also serve to provide some insight for BXers into the Yoneda Lemma. The key observation is due to Bartosz Milewski, but not published anywhere.
Tue 10 AprDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
16:30 - 18:10 | |||
16:30 30mTalk | An Axiomatic Basis for Bidirectional Programming Bx Hsiang-Shang ‘Josh’ Ko National Institute of Informatics, Japan, Zhenjiang Hu National Institute of Informatics Link to publication DOI | ||
17:00 30mTalk | Profunctor Optics and the Yoneda Lemma Bx | ||
17:30 30mTalk | Towards sound, flexible and optimal build for megamodels Bx Perdita Stevens University of Edinburgh | ||
18:00 10mDay closing | Closing Bx |