Free Theorems Involving Type Constructor Classes

Free Theorems Involving Type Constructor Classes
复制标题

涉及类型构造函数类的自由定理

DOI:
10.1145/1631687.1596577
复制
发表时间:
2008
影响因子:
4.6
通讯作者:
Janis Voigtl
Janis Voigtl
中科院分区:
医学3区
文献类型:
--
作者:
F. Pearl;Janis Voigtl

文献摘要

参考文献

被引文献

相似文献

自由定理是一种魅力,它允许从程序的(多态)类型中推导出有用的语句。我们将展示如何收获这样的定理,不仅从多态性在普通类型,但也从多态性的类型构造限制类约束。我们的主要应用领域是monad,它可能是Haskell中最流行的类型构造器类。为了证明更广泛的范围,我们还处理了一个透明的方式引入差异列表到一个程序中,赋予一个整洁和一般的正确性证明。
Free theorems are a charm, allowing the derivation of useful statements about programs from their (polymorphic) types alone. We show how to reap such theorems not only from polymorphism over ordinary types, but also from polymorphism over type constructors restricted by class constraints. Our prime application area are monads, which form the probably most popular type constructor class of Haskell. To demonstrate the broader scope, we also deal with a transparent way of introducing difference lists into a program, endowed with a neat and general correctness proof.
快速而宽松的推理在道德上是正确的
DOI: 10.1145/1111320.1111056
发表时间: 2006
影响因子: --
作者:
Danielsson N
通讯作者: Danielsson N