Tambara Equipment: Unlocking the Secrets of Haskell Optics and Category Theory
Tambara Equipment
I was drawn to category theory to understand Haskell optics, eventually cracking the code on traversal optics with colleagues at the Oxford Adjoint School. This post explores how Tambara modules act as horizontal arrows in a double category, functioning as proarrow equipment. I illustrate these concepts using Haskell code, showing how Tambara modules relate to monoidal functors just as profunctors relate to functors, and how this framework simplifies complex structures like traversals.
"The slogan is that Tambara modules are to monoidal functors as profunctors are to functors."