haskell-parser-playground
Hands on Seminar - Anwendungsentwicklung 2025 - Haskell Parserkombinatoren
Next Steps
- Get to know Haskell again
- Research about parser combinators
- Research about suitable use cases
- Contact and plan meeting with Wehr till 21.11.2025
[x] created JSON Parser
Meeting results 21.11.2025
- Create a json parser with parser combination to show the functionality and usage of parsers at presentation
- Create a postgresql parser with parser combination and a how to for the professor how to use that parser
- Until 13.12.2025 figure out both points above and design some presentation slides
Reading list
Week 1-2 (10.11 - 23.11)
Goal: Understand what parsing is and why we need combinators at all.
- Sipser – Introduction to the Theory of Computation [ ]
Chapter 2 — Finite automata and regular languages Chapter 3 — Context-free grammars and pushdown automata
- Aho et al. – Compilers: The Dragon Book [ ]
Read Chapter 2 (“Syntax Analysis”) and Chapter 3 (“Parsing Techniques”)
Week 3 (24.11 - 30.11)
Goal: Learn the concept of parser combinators and experience their minimal beauty.
- Hutton & Meijer – Monadic Parser Combinators [ ]
Focus on sections 2–4 (definitions, sequencing, choice) Stop before optimizations—just get the basic monadic machinery running.
- Hutton & Meijer – Functional Pearl: Monadic Parsing in Haskell [ ]
A clearer, shorter restatement—read it after the previous one as a digest. Pay attention to how do-notation replaces explicit binds; it makes composition feel magical.
Week 4 (01.12 - 07.12)
Goal: Move from cute toy parsers to practical ones.
- Swierstra & Duponcheel – Deterministic, Error-Correcting Combinator Parsers [ ]
Focus on sections 1–4: deterministic choice, error recovery. The key takeaway is how to prevent exponential backtracking and produce readable error messages.
- Leijen & Meijer – Parsec: Direct Style Monadic Parser Combinators for the Real World [ ]
Read the full paper slowly. Compare Parsec’s continuation-passing style with your simple combinator implementation.
Week 5 (08.12 - 14.12)
Goal: Deepen abstraction sense—why combinators compose so elegantly.
- Willis & Wu – Design Patterns for Parser Combinators [ ]
Skim for architectural insights: layering, modularity, extensibility. It helps when you start engineering your own library or DSL parser.
- Krishnaswami & Yallop – A Typed, Algebraic Approach to Parsing [ ]
Advanced but rewarding—introduces typed algebraic reasoning about parser structure. Read after you feel comfortable with monads and applicatives. Focus on how types capture grammar constraints.
Week 6 (15.12 - 21.12)
- Danielsson – Total Parser Combinators [ ]
Leave this for dessert 🍰 It’s Agda-level totality and proof of correctness—great once you want to see formal verification of parser behavior.
What is a parser
According to Professor Graham Hutton a parser is a function which takes a string and produces a tree.
GHCUP
Install on Linux Mint
sudo apt-get install build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev libncurses6 libtinfo6 pkg-config
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh