Elaborator reflection: extending Idris in Idris
Authors:
Open Access
- 4 September 2016
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 51 (9) , 284-297
Abstract
Many programming languages and proof assistants are defined by elaboration from a high-level language with a great deal of implicit information to a highly explicit core language. In many advanced languages, these elaboration facilities contain powerful tools for program construction, but these tools are rarely designed to be repurposed by users. We describe elaborator reflection , a paradigm for metaprogramming in which the elaboration machinery is made directly available to metaprograms, as well as a concrete realization of elaborator reflection in Idris, a functional language with full dependent types. We demonstrate the applicability of Idris’s reflected elaboration framework to a number of realistic problems, we discuss the motivation for the specific features of its design, and we explore the broader meaning of elaborator reflection as it can relate to other languages.Keywords
Funding Information
- Højteknologifonden (17-2010-3)
- National Science Foundation (1540276)
- Engineering and Physical Sciences Research Council (EP/N024222/1)
This publication has 17 references indexed in Scilit:
- Dependent types and multi-monadic effects in F*2016
- Type-Directed Elaboration of Quasiquotations2014
- Dependent type providers2013
- Mtac2013
- Typed syntactic meta-programming2013
- Scala macros: let our powers combine!2013
- Themes in information-rich functional programming for internet-scale data sources2013
- The gentle art of levitation2010
- Modelling general recursion in type theoryMathematical Structures in Computer Science, 2005
- A general formulation of simultaneous inductive-recursive definitions in type theoryThe Journal of Symbolic Logic, 2000