Statically Typed Interpreters
summary
Builds a statically typed interpreter in Haskell and claims it prevents runtime type errors by moving checks into the compiler stage, using GADTs, existential wrappers to erase and reintroduce type information, and the constraints package’s Dict/dictionary trick to carry typeclass implementations. Implements a small relational-algebra-like DSL, solves scoping and heterogeneous environment issues, and demonstrates evaluation of well-typed ASTs. Not published as open source; used internally while iterating rapidly.
AI-written summary · about
chapters (13)
- 0:00Start
- 2:27Motivating Problem
- 4:17Simplified Expression Execution Engine
- 4:48Tools
- 5:33Parsing
- 6:33Binary Operators
- 9:20Constructors
- 10:42Logical Operators
- 11:45Translations
- 17:52Custom Type Classes
- 20:20Scoping
- 21:42Base Case
- 24:24Sparkle Library
related talks
01h 57mTypes as Program Specifications: A Intro to Type-Level Programming in Haskell
50mTyping a LISP
39mDependent Types in Haskell
49mThe Trouble With Types
15mTaming Type Annotations in Gradual Typing
45mDepending on Types
31mKnow Your Types - Bringing Static Types to Dynamic Languages
42mIf I unit test do I really need static typing
