Prototyping generic programming in Template Haskell

被引:0
|
作者
Norell, U [1 ]
Jansson, P [1 ]
机构
[1] Chalmers Univ Technol, S-41296 Gothenburg, Sweden
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 generically 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.
引用
收藏
页码:314 / 333
页数:20
相关论文
共 50 条
  • [1] Template Your Boilerplate Using Template Haskell for Efficient Generic Programming
    Adams, Michael D.
    DuBuisson, Thomas M.
    ACM SIGPLAN NOTICES, 2012, 47 (12) : 13 - 24
  • [2] Libraries for Generic Programming in Haskell
    Jeuring, Johan
    Leather, Sean
    Magalhaes, Jose Pedro
    Yakushev, Alexey Rodriguez
    ADVANCED FUNCTIONAL PROGRAMMING, 2009, 5832 : 165 - 229
  • [3] Comparing approaches to generic programming in Haskell
    Hinze, Ralf
    Jeuring, Johan
    Loeh, Andres
    DATATYPE-GENERIC PROGRAMMING, 2007, 4719 : 72 - +
  • [4] Comparing Libraries for Generic Programming in Haskell
    Rodriguez, Alexey
    Jeuring, Johan
    Jansson, Patrik
    Gerdes, Alex
    Kiselyov, Oleg
    Oliveira, Bruno C. D. S.
    ACM SIGPLAN NOTICES, 2009, 44 (02) : 111 - 122
  • [5] Template meta-programming for Haskell
    Sheard, T
    Jones, SP
    ACM SIGPLAN NOTICES, 2002, 37 (12) : 60 - 75
  • [6] Comparing Libraries for Generic Programming in Haskell
    Rodriguez, Alexey
    Jeuring, Johan
    Jansson, Patrik
    Gerdes, Alex
    Kiselyov, Oleg
    Oliveira, Bruno C. D. S.
    HASKELL'08: PROCEEDINGS OF THE ACM SIGPLAN 2008 HASKELL SYMPOSIUM, 2008, : 111 - 122
  • [7] Scala for generic programmers Comparing Haskell and Scala support for generic programming
    Oliveira, Bruno C. D. S.
    Gibbons, Jeremy
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2010, 20 : 303 - 352
  • [8] Generic Haskell: Applications
    Hinze, R
    Jeuring, J
    GENERIC PROGRAMMING, 2003, 2793 : 57 - 96
  • [9] Generic Storage in Haskell
    Visser, Sebastiaan
    Loh, Andres
    WGP 2010: PROCEEDINGS OF THE 2010 ACM SIGPLAN WORKSHOP ON GENERIC PROGRAMMING, 2010, : 25 - 36
  • [10] Generic Haskell: Practice and theory
    Hinze, R
    Jeuring, J
    GENERIC PROGRAMMING, 2003, 2793 : 1 - 56