True sums of products

True sums of products
复制标题

乘积的真实总和

DOI:
10.1145/2633628.2633634
复制
发表时间:
2014
影响因子:
1.1
通讯作者:
Andres Löh
Andres Löh
中科院分区:
计算机科学2区
文献类型:
--
作者:
Edsko de Vries;Andres Löh

文献摘要

参考文献

被引文献

相似文献

我们介绍了数据类型形式编程(In Haskell)的产品总和(SOP)视图。虽然当今通常使用的许多库表示数据类型是二进制总和和产品的任意组合,但SOP更忠实地反映了数据类型的结构:每个数据类型都是单个N- ARY总和,其中总和是单个组件是一个单一的组件N- ARY产品。事实证明,这种表示在当今的扩展中可以准确地表达。所得的数据类型的列表结构允许定义强大的高级遍历组合器,这反过来又鼓励以组成和简洁的方式定义通用功能。 SOP视图的主要优点是,它允许将特定于功能的元数据与主要结构表示形式分开,并稍后重新组合此信息。
We introduce the sum-of-products (SOP) view for datatype-generic programming (in Haskell). While many of the libraries that are commonly in use today represent datatypes as arbitrary combinations of binary sums and products, SOP reflects the structure of datatypes more faithfully: each datatype is a single n-ary sum, where each component of the sum is a single n-ary product. This representation turns out to be expressible accurately in GHC with today's extensions. The resulting list-like structure of datatypes allows for the definition of powerful high-level traversal combinators, which in turn encourage the definition of generic functions in a compositional and concise style. A major plus of the SOP view is that it allows to separate function-specific metadata from the main structural representation and recombining this information later.
轻柔的悬浮艺术
DOI: 10.1145/1932681.1863547
发表时间: 2010
影响因子: --
作者:
Chapman J
通讯作者: Chapman J