Analyzing Functional Programs
summary
Shows how Tagless Final and the Free Monad let business logic stay effect-agnostic while enabling concrete interpreters: a synchronous in-memory test interpreter, a Scalacheck Gen interpreter that generates random outputs, and a writerT tracing interpreter that records every repo operation. Uses Scala pet store domain, composes interpreters via foldMap, and runs random walks through the program to find surprising behaviors (example: asserts update-status never issues delete). Examples compile into Gen values and the tests successfully catch injected failures.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 0:28Abstraction
- 1:56Tagless Final
- 4:18Production Interpreter
- 5:27Test Interpreter
- 7:23Generating Programs
- 10:11Tracing
- 10:56Tracing Interpreter
- 12:59Code Properties
- 17:10FreeMonad
- 18:12Inject
- 19:44Generating Interpreter
- 21:21Tracing with Free
related talks
42mFunctional interpreters and you
46mTesting in the world of Functional Programming
37mIntro to FP in Scala: Exploring a Toolbox for Solving Problems - Part 6 of 6
34mA Year living Freely
34mHow I learned to stop worrying and love Functional Design
44mFunctional Interpreters and You
01h 00mWhat The Functional Programming
34mPatterns of a pragmatic functional architecture
