Finally Tagless DSLs and MTL
summary
Claims that MTL is an instance of the Finally Tagless DSL pattern and demonstrates equivalence with ASTs built by fixed-point functors and functor sums, using Haskell, transformers, pattern functors and Hutton’s razor examples. Shows concrete costs — about 40 new lines and three pragmas to make the functor-sum version — and tradeoffs: composable constraint stacking, instance blowup for library authors, and loss of effect ordering guarantees; provides concrete interpreter encodings and when each style runs or fails.
AI-written summary · about
chapters (4)
- 0:00The problem with DSLs
- 3:01Fixed-point surgery
- 6:55Finally tagless encoding
- 13:57MTL and practical effects
related talks
49mFree vs Tagless Final: What, Why, When?
13mDesigning Feature DSLs: Principles and Tradeoffs
49mType Theory Behind the Glasgow Haskell Compiler Internals (Part 2)
15mSynthesizing DSLs for Few-Shot Learning
29mStaging Automatic Differentiation with Fusion
01h 09mLatent Effects and Handlers + Automatic Differentiation via Effects and Handlers
46mChasing Arrows, in categories containing functors and monads
14mNominal Semantics for First-class Automatic Differentiation
