计算机科学 > 程序设计语言
[提交于 2014年6月10日]
标题:Free Applicative Functors
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Applicative functors are a generalisation of monads. Both allow the expression of effectful computations into an otherwise pure language, like Haskell. Applicative functors are to be preferred to monads when the structure of a computation is fixed a priori. That makes it possible to perform certain kinds of static analysis on applicative values. We define a notion of free applicative functor, prove that it satisfies the appropriate laws, and that the construction is left adjoint to a suitable forgetful functor. We show how free applicative functors can be used to implement embedded DSLs which can be statically analysed.
提交历史
来自:EPTCS[v1] 2014年6月10日 星期二 00:00:00 UTC