Boxes go bananas: encoding higher-order abstract syntax with parametric polymorphism
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
Scrap your nameplate: (functional pearl)
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Parametric higher-order abstract syntax for mechanized semantics
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
Syntax for Free: Representing Syntax with Binding Using Parametricity
TLCA '09 Proceedings of the 9th International Conference on Typed Lambda Calculi and Applications
A universe of binding and computation
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
Generic programming with fixed points for mutually recursive datatypes
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
Unembedding domain-specific languages
Proceedings of the 2nd ACM SIGPLAN symposium on Haskell
Dependently typed programming in Agda
AFP'08 Proceedings of the 6th international conference on Advanced functional programming
Accelerating Haskell array codes with multicore GPUs
Proceedings of the sixth workshop on Declarative aspects of multicore programming
On the bright side of type classes: instance arguments in Agda
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
GMETA: a generic formal metatheory framework for first-order representations
ESOP'12 Proceedings of the 21st European conference on Programming Languages and Systems
Proceedings of the 9th ACM SIGPLAN workshop on Generic programming
Hi-index | 0.00 |
In this paper we present a datatype-generic approach to syntax with variable binding. A universe specifies the binding and scoping structure of object languages, including binders that bind multiple variables as well as sequential and recursive scoping. Two interpretations of the universe are given: one based on parametric higher-order abstract syntax and one on well-typed de Bruijn indices. The former provides convenient interfaces to embedded domain-specific languages, but is awkward to analyse and manipulate directly, while the latter is a convenient representation in implementations, but is unusable as a surface language. We show how to generically convert from the parametric HOAS interpretation to the de Bruijn interpretation thereby taking the pain from DSL developer to write the conversion themselves.