Hackett: a metaprogrammable Haskell
summary
Hackett embeds the Haskell type system inside Racket’s macro system and implements interleaved macroexpansion and typechecking (based on POPL 2017) so macros can see inferred types. A 30-line demo web server runs on port 8080 and shows compile-time type tooltips and highlighted errors. Implemented features include a def-server macro for declarative routes and a typed holes macro that reports required types; the runtime reuses Racket, while the typechecker is newly implemented.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:55What this talk is about
- 2:22Hackett code
- 4:51Hackett is a Haskell
- 5:40Macros
- 10:46DSLs
- 12:11Type classes
- 16:28Macro meta programming
- 24:24Summary
- 26:49Macros vs Splices
- 27:58Staged Restrictions
related talks
22mA look across the pond: a comparison between GHC and Racket compilation models
01h 03mModern Macros
23mMacro-embedding Compiler Intermediate Languages in Racket
09mOn Teaching Type Systems as Macros (Lightning Talk)
17mMacros for Domain-Specific Languages
38mType-level interfaces in Haskell & Rust: pragmatic type-level programming
42m#lang wishful thinking
45mLanguage-Oriented Programming with Racket
