...
【24h】

Arity-generic datatype-generic programming: (abstract only)

机译:Arity通用数据类型通用编程:(仅抽象)

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

Some programs are doubly-generic. For example, map is datatype-generic in that many different data structures support a mapping operation. A generic programming language like Generic Haskell can use a single definition to generate map for each type. However, map is also arity-generic because it belongs to a family of related operations that differ in the number of arguments. For lists, this family includes repeat, map, zipWith, zipWith3, zipWith4, etc. With dependent types or clever programming, one can unify all of these functions together in a single definition. However, no one has explored the combination of these two forms of genericity. These two axes are not orthogonal because the idea of arity appears in Generic Haskell: datatype-generic versions of repeat, map and zipWith have different arities of kind-indexed types. In this paper, we define arity-generic datatype-generic programs by building a framework for Generic Haskell-style generic programming in the dependently-typed programming language Agda 2.
机译:有些程序是双泛型的。例如,map是数据类型通用的,因为许多不同的数据结构都支持映射操作。通用编程语言(例如Generic Haskell)可以使用单个定义为每种类型生成映射。但是,map也是泛型的,因为它属于参数数量不同的一系列相关操作。对于列表,该系列包括重复,映射,zipWith,zipWith3,zipWith4等。通过依赖类型或巧妙的编程,可以将所有这些功能统一在一个定义中。但是,没有人探索这两种通用形式的组合。这两个轴不是正交的,因为Arity的想法出现在Generic Haskell中:repeat,map和zipWith的数据类型通用版本具有不同的种类索引类型的arity。在本文中,我们通过使用依赖类型的编程语言Agda 2构建Generic Haskell风格的通用编程框架来定义arity-generic数据类型-generic程序。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号