Strathprints Institutional Repository Haskell Programming with Nested Types: a Principled Approach. Higher-order and Symbolic Computation, 22 (2). Pp. 155-189. Haskell Programming with Nested Types: a Principled Approach †

Strathprints Institutional Repository Haskell Programming with Nested Types: a Principled Approach. Higher-order and Symbolic Computation, 22 (2). Pp. 155-189. Haskell Programming with Nested Types: a Principled Approach †
复制标题

Strathprints 机构存储库使用嵌套类型进行 Haskell 编程:高阶和符号计算,第 155-189 页。

DOI:
--
复制
发表时间:
--
期刊:
影响因子:
--
通讯作者:
Patricia Johann
Patricia Johann
中科院分区:
--
文献类型:
--
作者:
Neil Ghani;Johann;Patricia;Patricia Johann

文献摘要

被引文献

相似文献

Strathprint旨在允许用户访问Strathclyde大学的研究输出。任何获利活动或任何商业收益的材料。未经事先收费或摘要的非营利性。构造该类型的数据,即通过该类型的数据封装结构化递归的折叠组合器,以及折叠/构建规则,该规则通过从中消除数据构造的数据来优化模块化程序使用该类型的构建组合,并立即使用折叠组合物消费。最初的代数语义被认为太弱了,无法捕获Haskell中嵌套类型的数据通常发生的递归模式,并且没有构建组合者或折叠/构建规则到目前为止,本文为嵌套类型定义。代数语义为Haskell中的嵌套类型提供了校长,表现力和优雅的基础。
Strathprints is designed to allow users to access the research output of the University of Strathclyde. Copyright © and Moral Rights for the papers on this site are retained by the individual authors and/or other copyright owners. You may not engage in further distribution of the material for any profitmaking activities or any commercial gain. You may freely distribute both the url (http://strathprints.strath.ac.uk/) and the content of this paper for research or study, educational, or not-for-profit purposes without prior permission or charge. Abstract. Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from them data constructed using the build combinator, and immediately consumed using the fold combinator, for that type. It has long been thought that initial algebra semantics is not expressive enough to provide a similar foundation for programming with nested types in Haskell. Specifically, the standard folds derived from initial algebra semantics have been considered too weak to capture commonly occurring patterns of recursion over data of nested types in Haskell, and no build combinators or fold/build rules have until now been defined for nested types. This paper shows that standard folds are, in fact, sufficiently expressive for programming with nested types in Haskell. It also defines build combinators and fold/build fusion rules for nested types. It thus shows how initial algebra semantics provides a principled, expressive, and elegant foundation for programming with nested types in Haskell.