This is a series I’m writing about implementing a compiler for a subset of Haskell, using nothing else than Haskell itself! We’ll go through the whole process, going from a file containing Haskell code to generating C that we can compile into a functional executable. I’ve only just started working on the series, so stay tuned for new posts as they come along: I’ll update this page whenever they arrive.
Haskell in Haskell
- 1 分
Parsing A Whitespace-Sensitive Language
- 25 分
This post is about how to parse programming languages which define blocks using indentation, instead of braces and semicolons. We’ll end up learning how to infer these blocks based on the indentation, using Typescript to parse a toy functional language.