Monoidal Parsing
summary
Claim: small language tweaks let an editor parse chunkwise and update names and errors quickly. Built a Haskell prototype and VSCode language-server wiring; key edits are remove multi-line nested comments and require hanging layout/whitespace sequences. Core technique uses a relative monoid acting on monoids (deltas pushed through lists, maps, tries) and a semi-direct product to merge ranges. Result: incremental position/interval maps support robust rename and error relocation; expects polylog-ish incremental updates in many operations, with tradeoffs (naive maps become ~4x slower without group inverses).
AI-written summary · about
chapters (10)
- 0:00Introduction and motivation
- 3:30The language design challenge
- 5:32Parsing paradigms
- 8:20Parentheses and structure
- 12:12Simplifying language rules
- 15:00Improving layout and recovery
- 20:27Relative positioning and deltas
- 26:10Maps and performance
- 31:20Semi-direct products and scope
- 35:27Conclusion and Q&A








