Do You Know Where Haskell Is Used?

Tags: functional, programming, haskell
Published: 2021-12-13 14:08:35

## Introduction

Hi there! We’re getting on with our series of posts on "where all those strange programming languages of yours are used". [Last time](https://dev.to/typeable/do-you-know-where-lisp-is-used-nowadays-4pbn) we told you about Lisp, and now we’re going to pick up the talk about functional languages and turn our eyes to Haskell.  It’s the main development language at Typeable and, surely, we couldn’t ignore this topic.

Haskell is a general-purpose purely functional programming language. Its distinctive features include strict static typing, lazy evaluations, algebraic data types, and a serious theoretical background. This language is relatively young, it emerged in 1990 but has already produced a big impact on other languages and programming language theory on the whole.

One of our recent posts described [useful Haskell-based utilities](https://dev.to/typeable/7-useful-tools-written-in-haskell-560d), but all of them are intended to be used by tech-savvy people. Today we’re going to give some examples of practical use in various industries.

![Industrial Haskell](https://typeable.io/images/haskell/industry.jpg)

## Where and how is Haskell used?

1. Probably, the most googled and well-known example of Haskell application in major companies is the ~~Facebook~~ **Meta** spam filters. Messages containing spam, links to potential malware and phishing attacks are filtered by Sigma, the system that was rewritten in Haskell in 2015. The choice of language was based, among other things, on performance requirements, the need for pure functions and static typing, as well as the possibility of interactive development. The [Haxl framework](https://github.com/facebook/Haxl) is used under the bonnet, which the company has open-sourced. You can find more details about the development process and technical aspects in the [company’s blog post](https://engineering.fb.com/2015/06/26/security/fighting-spam-with-haskell/).

2. [**Eaton**](https://www.eaton.com) is a manufacturer of electrical and hydraulic equipment, as well as components for the aviation and automotive sectors. The company is using Haskell for day-to-day tasks such as scripting, hardware simulation, remote control tools for vehicle systems, etc. However, the most interesting thing is that they have entrusted hydraulic elements to the control of code written in Atom DSL, which is also implemented in Haskell. Atom is used to develop hard real-time systems and allows describing declaratively the system state transition rules. During compilation, the tasks are scheduled, which is why the resulting code has a deterministic execution time and constant memory consumption. This makes verification of the obtained code much easier and generally increases the system security, which is, of course, very important in this subject domain. You can read about all this in more detail on the [slides](https://www.slideserve.com/kin/controlling-hybrid-vehicles-with-haskell) and in the [Atom repository](https://github.com/tomahawkins/atom).

3. Now let’s jump to an entirely different sphere, that is, the world of music. The service called [**Chordify**](https://chordify.net/) allows converting music from YouTube, SoundCloud, etc. into chords so that you could learn to play your favorite songs. Haskell is mostly used during the tracing process; to this end, developers use the [HarmTrace library](https://github.com/haas/harmtrace) that analyses the sequences of musical harmonics.

![Use chords generated by Haskell library to play your favorite music](https://typeable.io/images/haskell/chord.jpg)

4. [**Kaspersky Lab**](https://www.kaspersky.com/) is developing its own secure operating system [KasperskyOS](https://os.kaspersky.com/) for IoT systems. Surely, this OS sets forth specific requirements for reliability and cyber security. The KasperskyOS team is actively using Haskell in the security system compiler and to create auxiliary development tools. The security configuration is described in a special DSL which is then compiled to C. As you can see, Haskell again demonstrates its usefulness when it comes to security.

5. Some of in-house tools for automotive development in **Tesla** are written in Haskell, which can be seen from the regularly published [vacancies](https://www.tesla.com/careers/search/job/haskell-engineerdatatools-82891). As far as I could understand from the vacancy descriptions, Haskell is used for the intermediate high-level representation of internal systems which is used to generate C code, documentation, and probably something more.

![Tesla's using Haskell too!](https://typeable.io/images/haskell/tesla.jpeg)

6. [**BIOCAD**](https://biocadglobal.com/) is one of the major biotech companies based in Russia. The company carries out the complete cycle of medicine development all the way through to mass production and marketing. In the course of medicine development BIOCAD develops its own internal services for data processing and storage. The backend of these services is written in Haskell; it uses the graph database Neo4j, for which the company has developed and published the driver called [Hasbolt](https://neo4j.com/blog/hasbolt-haskell-neo4j-bolt-driver/).

7. Haskell has filled its niche in the development of **blockchains and cryptocurrency**. It seems to me, the majority of Haskell-related vacancies I’ve ever seen were in this field. [**Cardano**](https://medium.com/@cardano.foundation/why-cardano-chose-haskell-and-why-you-should-care-why-cardano-chose-haskell-and-why-you-should-f97052db2951) should be mentioned as one of the most famous. The main cause of Haskell’s popularity in this sphere is security again. For more details see the [post by FPComplete](https://www.fpcomplete.com/blog/why-haskell-is-hot-for-cryptocurrencies/).

8. If you find blockchains to be too dull, serious or "inhuman", I can tell you about [**Co-Star**](https://www.costarastrology.com/), an astrological application for personalized horoscopes. Their backend is written in Haskell, and the developers explained their choice of language on the [application website](https://www.costarastrology.com/why-haskell/).

![Haskell has even something to do with astrology](https://typeable.io/images/haskell/astrology.jpeg)

9. The backend of [**Wire messenger**](https://wire.com/en/), with the server code publicly available in the [company’s repository](https://github.com/wireapp/wire-server) and detailed documentation, also written in Haskell.

10. [**The American Museum of Natural History**](https://www.amnh.org/research/computational-sciences) uses Haskell to study the phylogenetic graphs reflecting the evolutionary relationships between different species. The code of this project is also [available on GitHub](https://github.com/amnh/pcg).

## Conclusion

The list of examples for this post was compiled to demonstrate the variety of applications and, surely, many of them have remained offscreen. Here you can find more details on the companies and industries using Haskell:

- [https://github.com/erkmos/haskell-companies](https://github.com/erkmos/haskell-companies)
- [https://wiki.haskell.org/Haskell_in_industry](https://wiki.haskell.org/Haskell_in_industry)

Here at Typeable we are using Haskell to develop projects for health care, tourism, fintech and many other sectors.