arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1604.01184cs.PLcs.SE
收藏

Eilenberg-Moore幺半群与回溯单子Transformers

Eilenberg--Moore Monoids and Backtracking Monad Transformers

Maciej Piróg

摘要:

我们发展了一个代数支撑的回溯单子Transformers的一般设置monoidal类别。作为我们的主要技术设备,我们介绍了Eilenberg-Moore幺半群,它结合了强单子幺半群与代数。我们表明,Eilenberg-摩尔幺半群符合代数的列表单子Transformer(“做正确的”)已知的Haskell库。由此,我们得到了许多结果,包括列表monad Transformer确实是一个monad、一个Transformer和MonadPlus类的一个实例。最后,我们构建了一个Eilenberg-Moore幺半群的自同态,其中,通过余密度单子建设,产生一个基于连续的实现一个拉欣泽。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑