Skip to content
0:00 / 0:00

#macros#typechecking#klister

Stuck macros: deterministically interleaving macro-expansion and typechecking

Compose Conference

2.9K subscribers • 30 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Samuel Gélineau

Advanced. Deep dive for people who know the field.

850 views7 years ago1 recommendation

Programming languagesSystems programmingCompilers and interpretersLanguage design and type systemsFunctional programming

Samuel Gélineau explains how allowing macros to get stuck solves the non-determinism caused by interleaving macro expansion and typechecking.

Compose NYC 2019 Speaker: Samuel Gélineau A new breed of functional programming languages is emerging: strongly-typed macro languages, such as Hackett and Typer. Those languages feature both macros, type inference, and most importantly, the combination of the two: macros which can interrogate the type inference system in order to decide which code to generate. Both languages propose to do so by interleaving macro-expansion and type-checking, but doing so naively leads to a non-deterministic outcome: the same program may be accepted by one version of the compiler and rejected by another! In this talk, I will explain what causes this non-determinism, and how allowing macros to get “stuck” could solve the problem.

Why it's here

1 person recommends this

What people say. Recommended for those interested in type-aware macros and compiler design.

u/blankhartin r/ProgrammingLanguages • Recommends

On “Useful Type-Aware Macros”

You should look at Klister https://github.com/gelisam/klister. See also related talks link to this video link to this video Is your project open source?

programming-talkscurated list on GitHubMentions

Under “Programming Language Design”

Stuck macros: deterministically interleaving macro-expansion and typechecking 00:41:55 by **Samuel Gélineau** (2019)