Visible to the public Composable and Hygienic Typed Syntax MacrosConflict Detection Enabled

TitleComposable and Hygienic Typed Syntax Macros
Publication TypeConference Proceedings
Year of Publication2015
AuthorsCyrus Omar, Chenglong Wang, Jonathan Aldrich
Conference NameSymposium on Applied Computing (SAC)
Date Published4/13/2015
PublisherACM New York, NY, USA ©2015
Conference LocationSpain
ISBN Number978-1-4503-3196-8
KeywordsApr'15, CMU, extensible syntax; macros; hygiene; type inference
Abstract

Syntax extension mechanisms are powerful, but reasoning about syntax extensions can be difficult. Recent work on type-specific languages (TSLs) addressed reasoning about composition, hygiene and typing for extensions introducing new literal forms. We supplement TSLs with typed syntax macros (TSMs), which, unlike TSLs, are explicitly invoked to give meaning to delimited segments of arbitrary syntax. To maintain a typing discipline, we describe two avors of term-level TSMs: synthetic TSMs specify the type of term that they generate, while analytic TSMs can generate terms of arbitrary type, but can only be used in positions where the type is otherwise known. At the level of types, we describe a third avor of TSM that generates a type of a specified kind along with its TSL and show interesting use cases where the two mechanisms operate in concert.

DOI10.1145/2695664.2695936
Citation Keynode-24913

Other available formats:

Omar_Composable_Hygienic_JA.pdf
AttachmentTaxonomyKindSize
Omar_Composable_Hygienic_JA.pdfPDF document685.58 KBDownloadPreview
AttachmentSize
bytes