Partial type constructors in practice
Partial type constructors in practice
复制标题
实践中的部分类型构造函数
DOI:
10.1145/3546189.3549923
复制
发表时间:
2022
期刊:
影响因子:
--
通讯作者:
Morris, J. Garrett
中科院分区:
文献类型:
--
作者:
Ingle, Apoorv;Hubers, Alex;Morris, J. Garrett
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
DOI:
--
发表时间:
2011
期刊:
International Symposium on Implementation and Application of Functional Languages
影响因子:
--
作者:
Anders Persson;E. Axelsson;Josef Svenningsson
通讯作者:
Josef Svenningsson
DOI:
--
发表时间:
2010
期刊:
Fuji International Symposium on Functional and Logic Programming
影响因子:
--
作者:
Dominic A. Orchard;Tom Schrijvers
通讯作者:
Tom Schrijvers
DOI:
--
发表时间:
2010
期刊:
ACM SIGPLAN Symposium/Workshop on Haskell
影响因子:
--
作者:
J. Garrett Morris
通讯作者:
J. Garrett Morris
DOI:
--
发表时间:
1990
期刊:
影响因子:
--
作者:
P. K. Hudak;P. Wadler
通讯作者:
P. Wadler