English

On Structuring Functional Programs with Monoidal Profunctors

Programming Languages 2022-07-05 v1

Abstract

We study monoidal profunctors as a tool to reason and structure pure functional programs both from a categorical perspective and as a Haskell implementation. From the categorical point of view we approach them as monoids in a certain monoidal category of profunctors. We study properties of this monoidal category and construct and implement the free monoidal profunctor. We study the relationship of the monoidal construction to optics, and introduce a promising generalization of the implementation which we illustrate by introducing effectful monoidal profunctors.

Keywords

Cite

@article{arxiv.2207.00852,
  title  = {On Structuring Functional Programs with Monoidal Profunctors},
  author = {Alexandre Garcia de Oliveira and Mauro Jaskelioff and Ana Cristina Vieira de Melo},
  journal= {arXiv preprint arXiv:2207.00852},
  year   = {2022}
}

Comments

In Proceedings MSFP 2022, arXiv:2206.09534