2022
DOI: 10.1145/3498723
|View full text |Cite
|
Sign up to set email alerts
|

Staging with class: a specification for typed template Haskell

Abstract: Multi-stage programming using typed code quotation is an established technique for writing optimizing code generators with strong type-safety guarantees. Unfortunately, quotation in Haskell interacts poorly with type classes, making it difficult to write robust multi-stage programs. We study this unsound interaction and propose a resolution, staged type class constraints, which we formalize in a source calculus λ ⇒ that elaborates into an explicit core calculus … Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1

Citation Types

0
1
0

Year Published

2022
2022
2024
2024

Publication Types

Select...
3
2
1

Relationship

0
6

Authors

Journals

citations
Cited by 7 publications
(2 citation statements)
references
References 46 publications
0
1
0
Order By: Relevance
“…Typed Template Haskell (TTH) is a very recent extension/alternative to normal TH (Pickering et al, 2019;Xie et al, 2022). Whereas in TH you can manipulate arbitrary parts of the syntax tree, add top-level splices of data types, definitions and functions, in TTH the programmer can only splice expressions but the AST fragments representing the expressions are well-typed by construction instead of untyped.…”
Section: Typed Template Haskellmentioning
confidence: 99%
“…Typed Template Haskell (TTH) is a very recent extension/alternative to normal TH (Pickering et al, 2019;Xie et al, 2022). Whereas in TH you can manipulate arbitrary parts of the syntax tree, add top-level splices of data types, definitions and functions, in TTH the programmer can only splice expressions but the AST fragments representing the expressions are well-typed by construction instead of untyped.…”
Section: Typed Template Haskellmentioning
confidence: 99%
“…Our notation for quoting and splicing is borrowed from MetaML [Taha and Sheard 2000]. In the following, we compare 2LTT to MetaML, MetaOCaml [Kiselyov 2014] and typed Template Haskell [Xie et al 2022].…”
Section: Related Workmentioning
confidence: 99%