A Couple Million Lines of Haskell: Production Engineering at Mercury Meta Description: Discover how Mercury scaled a couple million lines of Haskell in production — lessons in type safety, team growth, and real-world functional programming at scale. TL;DR Mercury, the fintech banking platform for startups, has built one of the largest known Haskell codebases in production — spanning a couple million lines. This article breaks down what that actually means, the engineering tradeoffs involved, the lessons learned, and what other teams can take away from running purely functional code at serious scale. Whether you're a Haskell enthusiast, a skeptical engineering manager, or just curious about unconventional tech stacks in fintech, there's something here for you. Introduction: When "Unusual" Becomes "Impressive" Most fintech companies reach for Java, Go, or Python when building their core banking infrastructure. Mercury chose Haskell — and not just for a microservice or two.…