HeadlinesBriefing favicon HeadlinesBriefing.com

Mercury’s Two‑Million‑Line Haskell Success Story

Hacker News •
×

Mercury, the fintech that serves 300,000 businesses, relies on a 2 million‑line Haskell codebase. Ian Duncan, a veteran Haskell engineer, explains how the language scales for a company that processed $248 billion in 2025. The blog series “Haskellers from the trenches” spotlights real‑world production lessons. It shows how type safety and compiler guarantees become operational assets rather than academic niceties for rapid growth.

Duncan argues that reliability stems from adaptive capacity, not just failure avoidance. When staff turnover hits 50 % yearly, a type system that documents interfaces keeps institutional knowledge alive. Mercury’s stability team runs feature‑level impact studies, asking how a failure would cascade and what rollback paths exist, shaping design before launch. This stance reduces midnight on‑call incidents and preserves developer focus.

The result is a production‑grade Haskell environment that withstood a $2 billion deposit surge during the SVB crisis and passed regulatory exams. Mercury’s experience shows that a large, evolving codebase can thrive when type safety is treated as an operational tool, not a theoretical luxury. It demonstrates that functional languages can scale without sacrificing reliability or speed for critical financial services.