【24h】

Prototyping Generic Programming in Template Haskell

机译:Haskell模板中的通用编程原型

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

摘要

Generic Programming deals with the construction of programs that can be applied to many different datatypes. This is achieved by parameterizing the generic programs by the structure of the datatypes on which they are to be applied. Programs that can be defined generi-cally range from simple map functions through pretty printers to complex XML tools. The design space of generic programming languages is largely unexplored, partly due to the time and effort required to implement such a language. In this paper we show how to write flexible prototype implementations of two existing generic programming languages, PolyP and Generic Haskell, using Template Haskell, an extension to Haskell that enables compile-time meta-programming. In doing this we also gain a better understanding of the differences and similarities between the two languages.
机译:通用编程处理可应用于许多不同数据类型的程序的构造。这是通过根据要应用通用程序的数据类型的结构对通用程序进行参数化来实现的。可以定义的程序范围从简单的地图功能到漂亮的打印机再到复杂的XML工具。通用编程语言的设计空间在很大程度上尚未得到开发,部分原因是实现这种语言所需的时间和精力。在本文中,我们展示了如何使用Template Haskell(可进行编译时元编程的Haskell扩展)编写两种现有的通用编程语言PolyP和Generic Haskell的灵活原型实现。通过这样做,我们还可以更好地理解两种语言之间的差异和相似之处。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号