-
If you are using VS Code, add this extension. If you use some other editor, there are more instructions here about setting up your environment.
-
Clone this repo
git clone https://github.com/kevinwilde/type-system-workshop.git
Run tests:
deno test test/tests.ts
Run a source file:
deno run --allow-read index.ts <path/to/file>
- ~25 mins: overview of the programming language we are building
- ~25 mins: implementing a typechecker that relies on type annotations
- ~20 mins: discussing type inference and how the algorithm will work
- ~50 mins: implementing the typechecker with inference
Everything we're going to be implementing is already available in different branches on this repo. This is here in case you need it or miss something at any point, but don't look now since these are the "answer key."
[Spoilers]
- Type checker relying on type annotations
- Changes for type inference, i.e. new test cases, changes in lexer/parser to make type annotations optional
- Type checker with inference
The syntax of our language is mostly based on racket.
The implementation of the type checker is heavily aided by Types and Programming Languages by Benjamin C. Pierce.
The implementations of the parser and interpreter include ideas from Northwestern's Programming Languages course by Robby Findler and University of Washington's Programming Languages course by Dan Grossman available on Coursera.