Practical Observable Sharing
summary
Solves two concrete problems: generate an EBNF and decide nullability from finally‑tagless applicative parsers, and simplify a logical‑circuit DSL and emit a schematic. Uses type-safe observable sharing implemented with GHC stable names or weak‑map emulations in JS, converts recursive values to a typed adjacency graph and back, and runs the reified circuits/parsers to show identical behavior. Notes practical caveats: relies on IO or monadFix plus laziness, needs invariants against compiler deduplication, and includes Haskell, PureScript and Scala implementations that mostly work.
AI-written summary · about
chapters (9)
- 0:00Start
- 11:52Stable Names
- 18:42Adjacency List
- 32:58Source Code
- 35:21Implementation in Haskell
- 49:01Simple Parser
- 52:27Name Parsers
- 1:12:09Monad Fix
- 1:21:26Order of Computation
related talks
01h 03mFunctional Programming Patterns for Mere Mortals
31mFunctional Shell and Reusable Components for Easy GUIs
26mInfinite Possibilities
49mScalaz, or: how I learned to stop worrying and love monads
46mFinite-state machines? Your compiler wants in!
27mPractical functional programming: pick two
31mMONADS - CODING FUNCTIONALLY
34mThe circuit as a point-free general model of computation
