计算机科学 > 程序设计语言
[提交于 2012年2月14日]
标题:Tracing monadic computations and representing effects
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:In functional programming, monads are supposed to encapsulate computations, effectfully producing the final result, but keeping to themselves the means of acquiring it. For various reasons, we sometimes want to reveal the internals of a computation. To make that possible, in this paper we introduce monad transformers that add the ability to automatically accumulate observations about the course of execution as an effect. We discover that if we treat the resulting trace as the actual result of the computation, we can find new functionality in existing monads, notably when working with non-terminating computations.
提交历史
来自:EPTCS[v1] 2012年2月14日 星期二 03:01:53 UTC