Trees that Grow

被引:0
|
作者
Najd, Shayan [1 ]
Jones, Simon Peyton [2 ]
机构
[1] Univ Edinburgh, Lab Fdn Comp Sci, Edinburgh EH8 9YL, Midlothian, Scotland
[2] Microsoft Res, Cambridge, England
关键词
functional programming; Haskell; algebraic data types; pattern matching; open data types; extensible data types; expression problem; tree decoration tree annotation;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We study the notion of extensibility in functional data types, as a new approach to the problem of decorating abstract syntax trees with additional information. We observed the need for such extensibility while redesigning the data types representing Haskell abstract syntax inside Glasgow Haskell Compiler (GHC). Specifically, we describe a programming idiom that exploits type-level functions to allow a particular form of extensibility. The approach scales to support existentials and generalised algebraic data types, and we can use pattern synonyms to make it convenient in practice.
引用
收藏
页码:42 / 62
页数:21
相关论文
共 50 条