Partial type constructors in practice

Partial type constructors in practice
复制标题

实践中的部分类型构造函数

DOI:
10.1145/3546189.3549923
复制
发表时间:
2022
期刊:
Haskell 2022: Proceedings of the 15th ACM SIGPLAN International Haskell Symposium
影响因子:
--
通讯作者:
Morris, J. Garrett
Morris, J. Garrett
中科院分区:
--
文献类型:
--
作者:
Ingle, Apoorv;Hubers, Alex;Morris, J. Garrett

文献摘要

参考文献

被引文献

相似文献

函数式编程语言中的类型构造函数是完备的:Haskell程序员可以同样容易地构造任何元素类型的列表。然而,在实践中,并不是所有类型构造函数的应用程序都同样合理:集合可能只对可排序元素有意义,或者嵌入DSL可能只对可序列化的返回类型有意义。Jones等人提出了部分类型构造函数的理论,它保证了类型应用程序是合理的,并扩展了高阶抽象,使其同样适用于部分和全部类型构造函数。本文从语言设计和实现两个方面评估了部分类型构造函数的实用性。我们扩展了GHC,最广泛使用的Haskell编译器,支持部分类型构造函数,并在编译器本身及其库上测试我们的扩展。我们表明,引入部分类型构造函数对大多数代码的影响很小,但在语言和库设计中提出了重要的问题。
Type constructors in functional programming languages are total: a Haskell programmer can equally readily construct lists of any element type. In practice, however, not all applications of type constructors are equally sensible: collections may only make sense for orderable elements, or embedded DSLs might only make sense for serializable return types. Jones et al. proposed a theory ofpartial type constructors, which guarantees that type applications are sensible, and extends higher-order abstractions to apply equally well to partial and total type constructors. This paper evaluates the practicality of partial type constructors, in terms of both language design and implementation. We extend GHC, the most widely used Haskell compiler, with support for partial type constructors, and test our extension on the compiler itself and its libraries. We show that introducing partial type constructors has a minimal impact on most code, but raises important questions in language and library design.
DOI: --
发表时间: 2017
期刊: Proc. ACM Program. Lang.
影响因子: --
作者:
J. Garrett Morris;R. Eisenberg
通讯作者: R. Eisenberg
嵌入式语言的通用 Monadic 结构
DOI: --
发表时间: 2011
期刊: International Symposium on Implementation and Application of Functional Languages
影响因子: --
作者:
Anders Persson;E. Axelsson;Josef Svenningsson
通讯作者: Josef Svenningsson
释放 Haskell 类型约束
DOI: --
发表时间: 2010
期刊: Fuji International Symposium on Functional and Logic Programming
影响因子: --
作者:
Dominic A. Orchard;Tom Schrijvers
通讯作者: Tom Schrijvers
经验报告:使用 hackage 为语言设计提供信息
DOI: --
发表时间: 2010
期刊: ACM SIGPLAN Symposium/Workshop on Haskell
影响因子: --
作者:
J. Garrett Morris
通讯作者: J. Garrett Morris
关于编程语言 Haskell 的报告:一种非严格的、纯函数式语言
DOI: --
发表时间: 1990
期刊:
影响因子: --
作者:
P. K. Hudak;P. Wadler
通讯作者: P. Wadler