11 Companies That Use Haskell in Production

생성일
May 4, 2022 11:23 AM
언어
Haskell
분야
Among programming languages, Haskell isn’t the most common choice (like JavaScript) or the one that makes a lot of engineers excited (like Rust).
At the same time, it has attracted a solid following in certain sub-fields of software development. Large companies like GitHub, Microsoft, Tesla, and Meta reach for the language when the necessity arises.
That’s because Haskell is best-in-class for building two things: self-contained systems of any complexity and domain-specific languages (DSLs).
In this article, I’ll look at the success stories of Haskell in areas like finance, blockchain, education, the automotive industry, and developer tooling. I’ll explain why large companies decide to use Haskell and what seems to me to be the future of the language.
notion imagenotion image
Hasura is an open-source GraphQL engine that gives you instant access to a GraphQL API for your data. In the GitHub repository of Hasura, Haskell is the most used language, followed by languages like TypeScript, JavaScript, Python, and Go.
At the start of 2022, Hasura raised $100 million at a 1 billion valuation, making them the first Haskell unicorn.
You can learn more about Hasura’s experience with Haskell by reading this blog post.
GitHub used Haskell for implementing Semantic, a command-line tool for parsing, analyzing, and comparing source code.
According to GitHub, Haskell is a good choice for this purpose because of Haskell’s strength in working with source code. As some of its most valuable features, they mention strong typing, lazy evaluation, purity, and the rich possibilities for users to define their own control flow.
Read more about why GitHub chose to use Haskell for Semantic here.
Meta is known to be a Haskell user and is also one of the biggest sponsors of the Haskell Foundation.
There are three Haskell projects that Meta has worked on that deserve featuring:
  • Sigma, an anti-abuse platform that processes more than a million requests per second.
  • Glean, a system for collecting and working with facts about source code.
  • Haxl, a framework for efficient and concise data fetching.
Here’s what they say about Haskell:
notion imagenotion image
Microsoft uses Haskell in Bond, a cross-platform framework for working with schematized data.
The Haskell part of Bond is mainly gbc, a command-line code generation tool that can generate C++ and C# code using Bond.
For a long time, Microsoft Research also significantly supported the Glasgow Haskell Compiler (GHC) by employing Simon Peyton Jones to work on it.
IOHK used Haskell to implement the Cardano blockchain platform and its smart contract language – Plutus. They chose it because Haskell is a perfect fit for high-assurance code in fields like finance and blockchain.
notion imagenotion image
Tesla has been regularly hiring Haskell engineers and interns for some years already.
There isn’t a lot of information out there about the exact specifics of their work. According to a comment in a job post made on Reddit, they use Haskell to generate C code that is then compiled into vehicle firmware.
Standard Chartered is a multinational banking and services company. They use Haskell and Mu, a strict dialect of Haskell, to provide in-house technologies to traders and quantitative analysts.
They liked Haskell because it’s pure, avoids hidden state, enables massive parallelism, and is statically typed. At the same time, they needed something that would mesh well with the already existing ecosystem at Standard Chartered.
For this reason, they developed their own in-house dialect of Haskell, Mu, in 2009. They have been using it ever since.
According to a talk done by a member of the team, Marten Agren, the current codebase consists of at least 5 million lines of Mu code and 1 million lines of Haskell code.
To hear more about Haskell at Standard Chartered, you can watch the HIW 2021 talk mentioned above.
Klarna has a reputation for using various functional programming languages in their codebase. While its core system is in Erlang, Klarna also uses languages like Scala, Clojure, and Haskell.
According to a talk from the Functional Programming Sweden meetup, they started using Haskell because they loved functional programming but didn’t like Scala. Writing FP code and educating new developers in pure FP in Scala was too much of a chore in contrast to just using Haskell.
You can read about Klarna’s experience writing production Haskell in this article by Felix Mulder.
Freckle is an online learning platform that adjusts to the skills of students. They use Haskell for all of their backend services and most of their tooling.
You can read more about Freckle’s experience using Haskell in our interview with Pat Brisbin. They also have an active engineering blog that you can check out.
Galois is a company that specializes in the research and development of trustworthy software systems for fields where failure is unacceptable. They have released several open-source projects made in collaboration with governmental agencies like NASA or NSA.
One of their most interesting projects is Copilot, a stream-based DSL for writing and monitoring embedded C programs. The framework was developed with support from NASA’s Aviation Safety Program and has been used by NASA for monitoring test flights of drones.
At Serokell, we use Haskell to great success for most of our day-to-day software development projects. We have used it to build the settlement layer of the Cardano blockchain, programming languages for the Tezos blockchain, cryptocurrency exchanges, a multi-currency wallet with its own DSL, and more.
If you need help with building a Haskell application, we’re here for you. Contact us and schedule a free 30-minute consultation with a C-level executive to talk about your goals and requirements.
Companies above list three things as the most significant benefits of Haskell:
  • Expressive type system.
  • Strong correctness guarantees.
  • Easy refactoring.
In addition, while Haskell is a great programming language for everyday purposes, we can separate two popular use cases.
The first one is complex systems where strong guarantees are required (such as blockchains like Cardano and fintech projects like Klarna).
The second is compilers and DSLs. On our list, the examples for this use case are projects like Bond, Semantic, Copilot.
Both of these use cases heavily benefit from the strengths of Haskell and manage to dodge most of its cons. They can rightfully be called the “killer apps” of Haskell.
If you are considering a project in these two areas, it’s hard to go wrong with picking Haskell.
As you can see, Haskell has conquered a strong position in two different niches. Additions like dependent types, linear types, and Liquid Haskell will further improve this position.
At the same time, new programming languages like Rust and TypeScript have taken the world of general software development by storm. They incorporate a lot of what is good about Haskell (and FP in general) while also focusing on great developer experience and being more approachable.
Can Haskell compete with these languages? Most likely, yes.
Lately, significant effort has gone into improving the developer tooling and experience of Haskell. Just last year, the Haskell Foundation was launched to support the language and its ecosystem. The IHP web framework provides an accessible introduction to type-safe web development for a lot of non-Haskellers. There’s plenty of new educational content coming out, some of it on our blog.
With more and more people getting exposed to FP idioms in modern programming languages, moving to a purely functional programming language like Haskell becomes less and less hard for developers, which benefits the language and its ecosystem significantly.
Therefore, we at Serokell are excited about the future of this language and all the innovations it can still bring to the world of software development.
If you want to keep updated about the world of functional programming, follow us on Twitter or subscribe to our newsletter via the form below.