~/talk

Design Patterns for Parser Combinators (Functional Pearl)

Talkat Haskell Symposium 2021 · 2021-08-26..08-27· [haskell]
links:none on file
slides:none on file

A cookbook of concrete parser-combinator fixes demonstrates on a small calculator parser: left recursion is eliminated by replacing naive recursion with chainL and chainR style combinators; whitespace is handled by a lexeme/token/fully layering; keyword collisions are solved with a keyword combinator that rejects identifier prefixes; a weak AST is replaced by a strong AST and typed infix folds (b->a->b) to force correct associativity. Patches land, CI tests pass, and the patterns appear in an accepted Haskell Symposium paper.

AI-written summary · about

  1. 0:00Intro
  2. 1:10The Problem
  3. 1:30Code Review
  4. 2:00Pull Request
  5. 2:30Reviewing the Commit
  6. 3:45Recursive Descent
  7. 5:00Chain Combinators
  8. 5:45Chain R
  9. 6:30Why Parser Combinators
  10. 7:05Failed
  11. 9:45More Failure
  12. 11:45Check CI
  13. 12:25Weak vs Strong
  14. 13:45Commit error
  15. 16:30Possible improvements
  16. 17:55Reviewing the code
  17. 20:50Questions
~/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.