asai: a Library for Compiler Diagnostics
summary
asai is an OCaml library that generates structured and partly‑unstructured compiler diagnostics, using algebraic effects to build semantic, user‑level backtraces and supporting multi‑span highlights instead of single column offsets. it avoids visual Unicode width heuristics (publishes byte/UTF‑16 offsets for LSP), emits Googleable error codes, and composes across libraries. a working prototype exists, it renders to terminal and HTML backends, and has been adopted to generate a website and to drive a private type‑checker under development.
AI-written summary · about
chapters (13)
- 0:00Asai introduction
- 1:04Designing compiler diagnostics
- 5:05User-friendly features
- 7:14Structured vs unstructured errors
- 10:28Compositionality in design
- 11:54Unicode challenges
- 18:20Tutorial API design
- 19:24Comparison with Grace
- 21:09Success stories
- 22:33Live demo
- 27:12Demo results
- 28:58Interaction with monads
- 29:19Q&A
related talks
23mTACAI: An Intermediate Representation based on Abstract Interpretation
14mUnveiling Compiler Faults via Attribute-Guided Compilation Space Exploration
15mThe Jai Programming Language and What Can We Learn From It
27mAST Meta-programming
18mCompiling with Abstract Interpretation
29mAnnotating Deeply Embedded Languages
36mTowards a Formally-verified Software Toolchain for open ISAs
53mFrom Within: Compiler Testing and Validation via Compilers
