首页    期刊浏览 2024年10月07日 星期一
登录注册

文章基本信息

  • 标题:Tracing monadic computations and representing effects
  • 本地全文:下载
  • 作者:Maciej Piróg ; Jeremy Gibbons
  • 期刊名称:Electronic Proceedings in Theoretical Computer Science
  • 电子版ISSN:2075-2180
  • 出版年度:2012
  • 卷号:76
  • 页码:90-111
  • DOI:10.4204/EPTCS.76.8
  • 出版社:Open Publishing Association
  • 摘要: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.
国家哲学社会科学文献中心版权所有