5 Tutorial: From Models to Interpreters
A core use case for algebraic is fast and cheap interpreter development. With the right tooling, throw-away interpreters can be an easy way to explore and validate language design choices quickly.
As it happens, Haskell is already pretty good at this. Algebraic data types
and functional destructuring syntax make interpreters easy to read and write,
and its type system keeps track of pervasive breaking changes for you.
algebraic addresses the untyped half of this equation—
In this series, we will implement three interpreters based on the models originally used to design algebraic itself:
A core model based on the untyped λ-calculus,
An extended syntax that compiles down to core constructs, and
A hosted variant that borrows additional constructs from the implementing platform.
The tutorials are written in an informal style with code and discussion mixed together. If you prefer source code, it can be read all in one place on github.