Porting an NES Emulator to Lean: Subtypes and Dependent Types @TeaLeavesProgramming
Porting an NES Emulator to Lean: Subtypes and Dependent Types  @TeaLeavesProgramming
Uploaded August 2026 | Updated November 2026, 3 hours ago
I write my very first subtype, which is the entire reason I wanted to try porting this emulator in the first place. We explore 2 different ways of accomplishing "here is some data and the compiler has proven these invariants about it."

Thumbnail painting: "Two Men Contemplating the Moon" (c. 1825) by Caspar David Friedrich
Porting an NES Emulator to Lean: Subtypes and Dependent TypesLets Play The Fools Errand - Part 9.Lost in the Folds: Haskell MOOC Set 5bHaskell For Dilettantes - Part 1 - IntroTurings World - An Introduction to Computability TheoryLets Play Alans Automaton Workshop: Part 2I Never Thought The LLM Leopards Would Eat My FaceThe VectrexWizardry: The Five Ordeals Part 2Haskell for Dilettantes 18: Monads!Only One Conductor50 Years of Text Games
Tea Leaves |

Porting an NES Emulator to Lean: Subtypes and Dependent Types

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER