Scale By The Bay 2018 Unconference: Joe Kachmar
summary
Builds a Haskell pattern that restricts effects by encoding interfaces as type classes and wiring concrete implementations into a ReaderT ReaderT app newtype so production uses real IO (HTTP manager, katip logging wired via generic lens) while tests swap in mock backends. Tests use phantom-type flags to choose instances and a list-backed logger (test scribe list) that captures log output for assertions. The approach works but gets cumbersome as the number of effects grows.
AI-written summary · about
chapters (6)
- 0:00Introduction and problem
- 4:04Defining effect interfaces
- 8:19Concrete implementations and usage
- 13:15Mocking for testing
- 19:54Critique and alternatives
- 22:46Q&A and final thoughts
related talks
39mDesigning software with effects systems
27mLimiting side-effects of applications at compile-time
49mA Practical Introduction to Eff in Haskell
33mExtensible Effects: A Leaner Cake for Purely Functional Code
50mFunctional Programming with Effects
01h 04mHaskell - A Peek Inside the Ivory Tower
30mLive coding session with James Douglas
59mHaskell Design Patterns for Genericity & Asynchronous Behavior
