11 Companies That Use Haskell in Production
Tags: haskell, blockchain, fintech, graphql
Published: 2022-05-04 08:16:31

Among programming languages, Haskell isn’t the most common choice (like JavaScript) or the one that makes a lot of engineers excited (like [Rust](https://serokell.io/blog/rust-guide)).

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. 

## 11 Haskell success stories

### Hasura 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4vpbvt5xcspr4qtjdj5o.png)

Hasura is an open-source GraphQL engine that gives you instant access to a GraphQL API for your data. In the [GitHub repository](https://github.com/hasura/graphql-engine) 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](https://economictimes.indiatimes.com/tech/funding/hasura-raises-100-million-becomes-tenth-startup-unicorn-of-2022/articleshow/89754612.cms) at a 1 billion valuation, making them the first Haskell unicorn. 

> A lot of what Hasura does can be boiled down to a performant JIT compiler that is presented as a web-server handling large concurrent loads. Haskell has allowed us to collaborate on a large codebase and has allowed us to move with startup-like speeds on infrastructure software without breaking things. [(Source)](https://hasurahq.medium.com/partnering-with-well-typed-and-investing-in-the-haskell-community-118e952a57e8)

You can learn more about Hasura’s experience with Haskell by reading [this blog post](https://hasura.io/blog/from-zero-to-hipster-haskell-in-production-97ea99d90c3b/).


### GitHub

[GitHub](https://github.com/) used Haskell for implementing [Semantic](https://github.com/github/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. 

>The Semantic project is concerned with parsing, analyzing (evaluating), and comparing source code and as such we are firmly rooted in the academic domain of programming language theory (PLT) and spend significant time applying existing research to the real world problem of analyzing source code on GitHub. Haskell is well suited to this domain. Its language features allow concise, correct, and elegant expression of the data structures and algorithms we work with. [(Source)](https://github.com/github/semantic/blob/master/docs/why-haskell.md)

Read more about why GitHub chose to use Haskell for Semantic [here](https://github.com/github/semantic/blob/master/docs/why-haskell.md).


### Meta 

[Meta](https://meta.com/) is known to be a Haskell user and is also one of the biggest sponsors of the [Haskell Foundation](https://haskell.foundation/).

There are three Haskell projects that Meta has worked on that deserve featuring: 

* [Sigma](https://engineering.fb.com/2015/06/26/security/fighting-spam-with-haskell/), an anti-abuse platform that processes more than a million requests per second. 
* [Glean](https://glean.software/), a system for collecting and working with facts about source code. 
* [Haxl](https://github.com/facebook/Haxl), a framework for efficient and concise data fetching. 

Here's what they say about Haskell: 

> Haskell is a purely functional programming language that is held in high esteem in the programming community for its expressive type system, rich library ecosystem, and high-quality implementations. This combination of properties enables the rapid development of robust software with strong correctness and safety guarantees. [(Source)](https://engineering.fb.com/2014/06/10/web/open-sourcing-haxl-a-library-for-haskell/)

### Microsoft 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7u2hx9qpjbi2j9tihaog.png)

Microsoft uses Haskell in [Bond](https://github.com/microsoft/bond), a cross-platform framework for working with schematized data. 

The [Haskell part](https://hackage.haskell.org/package/bond) 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](https://www.microsoft.com/en-us/research/) also significantly supported the Glasgow Haskell Compiler (GHC) by employing [Simon Peyton Jones](https://en.wikipedia.org/wiki/Simon_Peyton_Jones) to work on it. 


### IOHK

[IOHK](https://iohk.io/) used Haskell to implement the [Cardano](https://cardano.org/) blockchain platform and its smart contract language – [Plutus](https://developers.cardano.org/docs/smart-contracts/plutus/). They chose it because [Haskell is a perfect fit](https://www.youtube.com/watch?v=CffrvwIW0JY) for high-assurance code in fields like finance and blockchain.

> If you look at the history of the cryptocurrency space over the last ten years, we’re riddled with exchange failures due to poor code. We’re riddled with multi-sig failures where people are able to steal hundreds of millions of dollars. The Dow hack was the most famous hack in our industry — just because we had an intent of what we wanted to do, but the reality was the code didn’t match that intent. 
>
> So you need a programming language that gives you a much higher degree of certainty and a larger toolbox, and is much more precise. It’s like a scalpel that can allow you to very carefully implement things, so you know that it’s going to work correctly. [(Source)](https://forkast.news/video-audio/watch-charles-hoskinson-co-founder-of-ethereum-and-iohk-on-why-cardano-is-a-better-platform-part-i-2-2/)


### Tesla


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1mbr5qrbd3kgioqui9mg.png)

[Tesla](https://www.tesla.com/) 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](https://www.reddit.com/r/haskell/comments/qvft29/haskell_tesla/), they use Haskell to generate C code that is then compiled into vehicle firmware.  


### Standard Chartered

[Standard Chartered](https://www.sc.com/en/) 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](https://www.youtube.com/watch?v=A70SN7vFsKU) talk mentioned above.


### Klarna


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88bx9at5zwizx660o2iq.png)

[Klarna](https://www.klarna.com/us/) 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](https://news.ycombinator.com/item?id=23702129). 

According to a talk from the [Functional Programming Sweden](https://www.youtube.com/watch?v=_8-JvZAfrB0) 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. 

> Haskell is great for business and great in production. Attracting talent has been a joy, people are excited to work in Haskell. The libraries we’ve needed exist in battle-tested form on Hackage/Stackage. The code we’ve produced has made it easy to onboard new folks. [(Source)](https://felixmulder.com/writing/2019/10/05/Haskell-in-Production.html)

You can read about Klarna’s experience writing production Haskell in [this article](https://felixmulder.com/writing/2019/10/05/Haskell-in-Production.html) by Felix Mulder. 


### Freckle 

[Freckle](https://freckle.com/en-us/) 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. 

> All the things advocates of Haskell typically mention have been true in our experience: as a production language, it is incredibly performant and has a rich library ecosystem. Developing business logic with a rich type system such as Haskell’s is an experience you can’t really describe to someone who’s never done it. There’s the base-level safety, sure, but a level above that is actually describing business logic with the types. The resulting code is robust, self-descriptive, and easy to refactor.

You can read more about Freckle’s experience using Haskell in our [interview](https://serokell.io/blog/haskell-in-production-freckle) with Pat Brisbin. They also have an active [engineering blog](https://tech.freckle.com/) that you can check out.


### Galois

[Galois](https://galois.com/) 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](https://copilot-language.github.io/), 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. 


### Serokell 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v9rx17zn13o5rwbia00s.png)

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](https://serokell.io/project-cardanosl) of the Cardano blockchain, [programming languages](https://serokell.io/project-lorentz-indigo) for the Tezos blockchain, [cryptocurrency exchanges](https://serokell.io/project-omega-media), a [multi-currency wallet](https://serokell.io/project-ariadne) with its own DSL, and more. 

If you need help with building a Haskell application, we’re here for you. [Contact us](https://serokell.io/#contacts) and schedule a free 30-minute consultation with a C-level executive to talk about your goals and requirements.


## What are the benefits of using Haskell?

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.

## Future of Haskell

As you can see, Haskell has conquered a strong position in two different niches. Additions like [dependent types](https://serokell.io/blog/why-dependent-haskell), [linear types](https://www.tweag.io/blog/2017-03-13-linear-types/), and [Liquid Haskell](https://www.tweag.io/blog/2022-01-19-why-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](https://haskell.foundation/) was launched to support the language and its ecosystem. The [IHP web framework](https://serokell.io/blog/ihp-interview) 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](https://serokell.io/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](https://serokell.io/) 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, don't forget to follow us on [Twitter](https://twitter.com/serokell) or here.