pith. sign in

arxiv: 1604.01184 · v1 · pith:5OWHEAABnew · submitted 2016-04-05 · 💻 cs.PL · cs.SE

Eilenberg--Moore Monoids and Backtracking Monad Transformers

classification 💻 cs.PL cs.SE
keywords monadeilenberg--mooremonoidstransformeralgebrasbacktrackinglisttransformers
0
0 comments X
read the original abstract

We develop an algebraic underpinning of backtracking monad transformers in the general setting of monoidal categories. As our main technical device, we introduce Eilenberg--Moore monoids, which combine monoids with algebras for strong monads. We show that Eilenberg--Moore monoids coincide with algebras for the list monad transformer ('done right') known from Haskell libraries. From this, we obtain a number of results, including the facts that the list monad transformer is indeed a monad, a transformer, and an instance of the MonadPlus class. Finally, we construct an Eilenberg--Moore monoid of endomorphisms, which, via the codensity monad construction, yields a continuation-based implementation a la Hinze.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.