计算机科学 > 程序设计语言
[提交于 2016年8月22日]
标题:Eilenberg--Moore Monoids and Backtracking Monad Transformers
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:EPTCS[v1] 2016年8月22日 星期一 00:00:00 UTC