~/talk

Modern DSL compiler architecture in OCaml our experience with Catala

Talkat OCaml 2023 · on Saturday, 2023-09-09· [compilers-and-language-design]
links:none on file
slides:none on file

Catala is an OCaml DSL for encoding legal rules; this session explains how the compiler uses a single centralized AST plus object types as row variables and small GADTs to get typed subsets per pass, yielding reusable generic printers and traversals. Practical techniques include open-recursion shallow map for concise per-pass transforms, polymorphic annotations for positions and typing state, and tradeoffs (centralized definitions, some type-error verbosity). Code and examples live on the project GitHub.

AI-written summary · about

  1. 0:00DSLs and Catala intro
  2. 1:09What is Catala
  3. 2:35Traditional compiler passes
  4. 4:00Hierarchical terms reduce boilerplate
  5. 5:25Flatten ASTs with subtyping
  6. 7:13Drawbacks of structural typing
  7. 8:18GADTs for pass-specific ASTs
  8. 10:03Row and object types
  9. 11:08Generic printers with GADTs
  10. 11:32Open recursion for ASTs
  11. 12:57Multi-pass with GADTs
  12. 15:06Annotate AST nodes
  13. 16:10Limitations and trade-offs
  14. 17:15Strengths of unified AST
  15. 18:17Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.