Write a Compiler That Understands Types
Course on Master.dev by Richard Feldman
- 4 h 50 min
- LengthVideo runtime
- Subscription
- Price modelMaster.dev plan
- 26
- Lessons
- Jun 2025
- Published10 Jun 2025
About this course
Description from Master.dev
Ever wonder how TypeScript figures out types? Type inference might seem like magic, but you'll implement it step by step using the powerful Hindley-Milner system. Construct each part of a working compiler, including parsing, scope resolution, type inference, and bytecode generation. Deepen your understanding of language design and compiler internals by building a type system from scratch!
What it covers
26 lessons
- 01
Introduction
- Introduction
- Terminology & Internal Architecture
- 02
Traversing the AST
- Formatter: Lexing, Parsing & Output
- Formatter Exercise
- 03
Bindings & Scope Resolution
- Name Resolution
- Hoisting
- Name Resolution Exercise
- 04
Type Inference
- Hindley-Milner Type System
- Inferring Constants
- Path Compression
- Type Check Exercise
- Type Unification
- Type Unification Q&A
- Unify Multiplication Operator Exercise
- 05
Inferring Types
- Inferring Conditionals
- Inferring Function Declarations
- Inferring Function Calls
- Inferring Functions Exercise
- 06
Polymorphism & Type Signatures
- Polymorphism
- Polymorphic Functions
- Type Annotations
- Polymorphism Exercise
- 07
Generating WASM
- Generating Web Assembly (WASM)
- WASM Exercise
- Polymorphic and Monomorphic Function Generation
- 08
Wrapping Up
- Wrapping Up
Similar TypeScript courses
Same topic, nearest in length, up to three from any one provider.
Data read from the Master.dev catalogue on 28 Nov 2026. How the data is collected.