Singletons and You in Haskell
summary
Shows how Richard Eisenberg's singletons library actually gives runtime witnesses so type-level states become usable values, illustrated by a GADT Door state example (open closed locked). Demonstrates how the library generates singletons for free and provides instances to turn types into witness values that let code pattern match on types, constrain functions by precise states, and emulate dependent behavior for state machines, refined strings, and tagged sanitization without manual boilerplate.
AI-written summary · about
chapters (5)
related talks
01h 20mA Practical Introduction to Haskell GADTs
49mIntroduction to Linear Type Systems and Linear Haskell
59mRock Solid Haskell Services (Part 1)
01h 00mType Theory Behind the Glasgow Haskell Compiler Internals (Part 5)
49mA Hands on Tutorial to Generic Programming in Haskell (Part 2)
01h 01mType Theory Behind the Glasgow Haskell Compiler Internals (Part 6)
49mType Theory Behind the Glasgow Haskell Compiler Internals (Part 2)
41mIdris: Practical Dependent Types with Practical Examples
