A Couple Million Lines of Haskell: Production Engineering at Mercury

· ai · Source ↗

TLDR

  • Mercury runs 2M lines of Haskell in production serving 300,000 businesses and $248B in 2025 transaction volume, maintained largely by engineers who learned Haskell on the job.

Key Takeaways

  • Purity in Haskell is a boundary discipline, not a language property; runST-style encapsulation lets dangerous mutation stay internal while exposing clean interfaces.
  • Mercury’s stability engineering team probes blast radius, idempotency, rollback paths, and in-flight work before features ship, not after.
  • Tribal knowledge encoded in types survives engineer churn; in a 2x/year growth company, half the team always has under a year of tenure.
  • The SVB crisis sent $2B in new deposits to Mercury in five days; the Haskell system absorbed it without incident.
  • “Make the right thing easy” means replacing wiki incantations with type-enforced invariants so correct ordering cannot be skipped under deadline pressure.

Hacker News Comment Review

  • No substantive HN discussion yet.

Original | Discuss on HN