~/talk

Shoehorning dependency injection into a FP language - What does it take?

Talkat LambdaConf 2025 · 2025-05-12..05-13· [developer-experience]
slides:none on file

Shows a concrete DI implementation for Unison that uses Unison abilities and handlers to resolve components from an overrides map, constructing values lazily and storing them in a dynamic any while tracking types with phantom sets. Achieves type-checked wiring and targeted overrides, records which constructors cause IO or state, and detects cycles only at runtime. Requires four boilerplate declarations per component, works end-to-end, and a Haskell variant with richer meta‑programming reduces the remaining friction.

AI-written summary · about

  1. 0:00Introduction
  2. 0:45Why mix dependency injection with FP
  3. 10:14Good DI criteria
  4. 15:11Unison overview
  5. 19:05Abilities and effects
  6. 23:21Bank account service
  7. 27:56Implementing dependency injection in Unison
  8. 32:30Library support
  9. 37:07Why it works
  10. 41:48Meta programming improvement
  11. 44:37Call to designers
  12. 45:38Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.