Vom 20.12.2025 bis 11.01.2026 ist die Universitätsbibliothek geschlossen. Ab dem 12.01.2026 gelten wieder die regulären Öffnungszeiten. Ausnahme: Medizinische Hauptbibliothek und Zentralbibliothek sind bereits ab 05.01.2026 wieder geöffnet. Weitere Informationen

Treffer: Datatype-generic programming meets elaborator reflection

Title:
Datatype-generic programming meets elaborator reflection
Contributors:
Ministry of Science and Technology, Taiwan
Source:
Proceedings of the ACM on Programming Languages ; volume 6, issue ICFP, page 225-253 ; ISSN 2475-1421
Publisher Information:
Association for Computing Machinery (ACM)
Publication Year:
2022
Document Type:
Fachzeitschrift article in journal/newspaper
Language:
English
DOI:
10.1145/3547629
Accession Number:
edsbas.3B8CF4FE
Database:
BASE

Weitere Informationen

Datatype-generic programming is natural and useful in dependently typed languages such as Agda. However, datatype-generic libraries in Agda are not reused as much as they should be, because traditionally they work only on datatypes decoded from a library’s own version of datatype descriptions; this means that different generic libraries cannot be used together, and they do not work on native datatypes, which are preferred by the practical Agda programmer for better language support and access to other libraries. Based on elaborator reflection, we present a framework in Agda featuring a set of general metaprograms for instantiating datatype-generic programs as, and for, a useful range of native datatypes and functions —including universe-polymorphic ones— in programmer-friendly and customisable forms. We expect that datatype-generic libraries built with our framework will be more attractive to the practical Agda programmer. As the elaborator reflection features used by our framework become more widespread, our design can be ported to other languages too.