# Erlang type system efforts

**URL:** <https://erlangforums.com/t/erlang-type-system-efforts/749>\
**Category:** BEAM Chat / Discussions\
**Tags:** static-typing, types\
**Created:** [December 6, 2021, 1:50pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749 "2021-12-06T13:50:30Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaashyapan](https://erlangforums.com/user_avatar/erlangforums.com/kaashyapan/32/1074_2.png) [@kaashyapan](https://erlangforums.com/u/kaashyapan)\
**Post date:** [December 6, 2021, 1:50pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/1 "2021-12-06T13:50:30Z")

</div>

What’s going on with the Erlang typing efforts ?  
Last I heard, Whatsapp had an internal project which was subsequently shelved.

Are there any other ongoing projects other than the Elixir ones (Typecheck, Norm etc…) ?

---

<div class="post-metadata">

**Author:** ![lpil](https://erlangforums.com/user_avatar/erlangforums.com/lpil/32/222_2.png) [@lpil](https://erlangforums.com/u/lpil)\
**Post date:** [December 6, 2021, 2:07pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/2 "2021-12-06T14:07:03Z")

</div>

While I don’t know of any active attempts to type check Erlang or Elixir code, there are several active statically typed languages on the BEAM

> **[GitHub - gleam-lang/gleam: ⭐️ A friendly language for building type-safe,...](https://github.com/gleam-lang/gleam/)**
>
> ⭐️ A friendly language for building type-safe, scalable systems! - GitHub - gleam-lang/gleam: ⭐️ A friendly language for building type-safe, scalable systems!

> **[GitHub - purerl/purerl: Erlang backend for the PureScript compiler](https://github.com/purerl/purerl)**
>
> Erlang backend for the PureScript compiler. Contribute to purerl/purerl development by creating an account on GitHub.

> **[GitHub - hamler-lang/hamler: Haskell-style functional programming language...](https://github.com/hamler-lang/hamler)**
>
> Haskell-style functional programming language running on Erlang VM. - GitHub - hamler-lang/hamler: Haskell-style functional programming language running on Erlang VM.

---

<div class="post-metadata">

**Author:** ![michallepicki](https://erlangforums.com/letter_avatar_proxy/v4/letter/m/5f9b8f/32.png) [@michallepicki](https://erlangforums.com/u/michallepicki)\
**Post date:** [December 6, 2021, 2:17pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/3 "2021-12-06T14:17:27Z")

</div>

There is a repository that tries to keep track of all the BEAM languages, including statically typed ones, and additional typing efforts for existing languages: [GitHub - llaisdy/beam\_languages: Languages, and about languages, on the BEAM](https://github.com/llaisdy/beam_languages)

I’m sure this is even not all of them! (I need to dig through my stars on GitHub and send PRs to add a few more)

The languages @lpil listed are probably the most mature of the statically-typed ones, and used in production

---

<div class="post-metadata">

**Author:** ![marcellanz](https://erlangforums.com/user_avatar/erlangforums.com/marcellanz/32/327_2.png) [@marcellanz](https://erlangforums.com/u/marcellanz)\
**Post date:** [December 6, 2021, 2:39pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/4 "2021-12-06T14:39:15Z")

</div>

This might be the “internal project” by WhatsApp [GitHub - WhatsApp/erlt: Early prototype of ErlT, an experimental Erlang dialect with first-class support for static typing.](https://github.com/WhatsApp/erlt)  
Alas I did not see it much discussed after it was released (and immediately archived on github).

---

<div class="post-metadata">

**Author:** ![AstonJ](https://erlangforums.com/user_avatar/erlangforums.com/astonj/32/9_2.png) [@AstonJ](https://erlangforums.com/u/AstonJ)\
**Post date:** [December 6, 2021, 3:04pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/5 "2021-12-06T15:04:36Z")

</div>

> [@kaashyapan](#):
>
> What’s going on with the Erlang typing efforts ?  
> Last I heard, Whatsapp had an internal project which was subsequently shelved.

I believe @alavrik was the lead for that project but it was dropped - perhaps Anton or @max-au might be able to shed some light as to why 😊

There were a few threads about it:

> **[Facebook is writing a new, statically typed language to run on the BEAM?!](https://elixirforum.com/t/facebook-is-writing-a-new-statically-typed-language-to-run-on-the-beam/29829)**
>
> I stumbled upon this tweet by @devonestes and I find this information very interestnig. I hope we could discuss it a bit more here. What do you think about it?

> **[Statically Typed Erlang by Whatsapp in November!](https://elixirforum.com/t/statically-typed-erlang-by-whatsapp-in-november/34291)**
>
> I wonder how/if Elixir (and Gleam) can build on top of that!

> **[Scaling Erlang Developer Experience at WhatsApp \[pdf\]](https://forum.devtalk.com/t/scaling-erlang-developer-experience-at-whatsapp-pdf/2061/3?u=astonj)**
>
> Hi @Aston, this is not a new language. I’d love to share more, but I don’t wan to cause confusion before we are ready to share details properly in November.

> [@kaashyapan](#):
>
> Are there any other ongoing projects other than the Elixir ones (Typecheck, Norm etc…) ?

I was going to link to @Qqwy’s [TypeCheck](https://elixirforum.com/t/typecheck-fast-and-flexible-runtime-type-checking-for-your-elixir-projects/32886) but you’ve already mentioned it.

Aside from that and in terms of a full language, currently Gleam looks like it might be the best fit as Louis is keen on BEAM/Erlang/Elixir interop from what I gather from his posts 😃

> [@What do we need for better BEAM interop?](https://erlangforums.com/t/what-do-we-need-for-better-beam-interop/245/24):
>
> Love this thread, I’ve been thinking about this a lot over the years, and much of Gleam’s design was made with this in mind. Gleam’s standard library is on Hex, largely so Hex can be used to manage all deps rather than needing the OS package manager for that. I’ve not yet done the plumbing for this yet but soon published Gleam Hex packages will include the precompiled Erlang output and typespecs, so if you’re an Erlang or Elixir user you won’t need to install the Gleam compiler to make use o…

---

<div class="post-metadata">

**Author:** ![alavrik](https://erlangforums.com/user_avatar/erlangforums.com/alavrik/32/928_2.png) [@alavrik](https://erlangforums.com/u/alavrik)\
**Post date:** [December 6, 2021, 3:42pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/6 "2021-12-06T15:42:38Z")

</div>

> [@AstonJ](#):
>
> > [@kaashyapan](#):
> >
> > What’s going on with the Erlang typing efforts ?
> > 
> > > Last I heard, Whatsapp had an internal project which was subsequently shelved.
> 
> I believe @alavrik was the lead for that project but it was dropped - perhaps Anton or @max-au might be able to shed some light as to why 😊

@AstonJ thanks for the ping. I am no longer with WhatsApp, so I can’t comment on the current state of the internal project for Erlang static typechecker. I very much hope that the project is going well. I believe that typechecker is essential for a large team that strives to stay efficient while working on a critical internet-scale service.

I also hope that we will eventually see some benefits of this project for the wider Erlang open-source community.

While I was at WhatsApp, we experimented with using Hindley-Milner for an Erlang-like language. We built an experimental Erlang dialect called ErlT: [GitHub - WhatsApp/erlt: Early prototype of ErlT, an experimental Erlang dialect with first-class support for static typing.](https://github.com/WhatsApp/erlt) Eventually, we decided not to pursue this experiment further and open sourced it.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://erlangforums.com/user_avatar/erlangforums.com/astonj/32/9_2.png) [@AstonJ](https://erlangforums.com/u/AstonJ)\
**Post date:** [December 6, 2021, 8:09pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/7 "2021-12-06T20:09:26Z")

</div>

Thanks for the info Anton 😊

> [@alavrik](#):
>
> I am no longer with WhatsApp, so I can’t comment on the current state of the internal project for Erlang static typechecker. I very much hope that the project is going well.

Is that a separate project to ErlT? ErlT has been archived so I guess it’s not something the WhatsApp team will be working on themselves (perhaps you could take over it?)

> [@alavrik](#):
>
> Eventually, we decided not to pursue this experiment further and open sourced it.

Were there any technical reasons for this or was it just something the team/WhatsApp lost interest in? (No problem if you’re not allowed to share details.)

---

<div class="post-metadata">

**Author:** ![starbelly](https://erlangforums.com/user_avatar/erlangforums.com/starbelly/32/209_2.png) [@starbelly](https://erlangforums.com/u/starbelly)\
**Post date:** [December 6, 2021, 10:27pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/8 "2021-12-06T22:27:29Z")

</div>

Anyone can of course pick up the effort since it’s open source.

---

<div class="post-metadata">

**Author:** ![michallepicki](https://erlangforums.com/letter_avatar_proxy/v4/letter/m/5f9b8f/32.png) [@michallepicki](https://erlangforums.com/u/michallepicki)\
**Post date:** [December 11, 2021, 11:20am UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/10 "2021-12-11T11:20:08Z")

</div>

GitHub introduced a new feature so I made a “erlang and static types” list of my GitHub stars: [https://github.com/stars/michallepicki/lists/erlang-and-static-types](https://github.com/stars/michallepicki/lists/erlang-and-static-types)  
edit: The star lists feature requires logging in to GitHub, otherwise shows a 404 error.

---

<div class="post-metadata">

**Author:** ![kaashyapan](https://erlangforums.com/user_avatar/erlangforums.com/kaashyapan/32/1074_2.png) [@kaashyapan](https://erlangforums.com/u/kaashyapan)\
**Post date:** [December 11, 2021, 12:09pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/11 "2021-12-11T12:09:23Z")

</div>

Wow. Its mind boggling how many man hours have gone into this.

Wonder what the Erlang folks were trying with this…  
[erlang-labs/typer: Erlang/OTP (github.com)](https://github.com/erlang-labs/typer)

---

<div class="post-metadata">

**Author:** ![tsloughter](https://erlangforums.com/user_avatar/erlangforums.com/tsloughter/32/418_2.png) [@tsloughter](https://erlangforums.com/u/tsloughter)\
**Post date:** [December 11, 2021, 1:24pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/12 "2021-12-11T13:24:13Z")

</div>

Doesn’t look like Gradualizer has been linked to here yet [GitHub - josefs/Gradualizer: A Gradual type system for Erlang](https://github.com/josefs/Gradualizer)

---

<div class="post-metadata">

**Author:** ![kaashyapan](https://erlangforums.com/user_avatar/erlangforums.com/kaashyapan/32/1074_2.png) [@kaashyapan](https://erlangforums.com/u/kaashyapan)\
**Post date:** [December 11, 2021, 2:45pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/13 "2021-12-11T14:45:17Z")

</div>

> [@tsloughter](#):
>
> Doesn’t look like Gradualizer has been linked to here yet [GitHub - josefs/Gradualizer: A Gradual type system for Erlang](https://github.com/josefs/Gradualizer)

Its the first on the list

---

<div class="post-metadata">

**Author:** ![AstonJ](https://erlangforums.com/user_avatar/erlangforums.com/astonj/32/9_2.png) [@AstonJ](https://erlangforums.com/u/AstonJ)\
**Post date:** [December 21, 2021, 8:33pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/14 "2021-12-21T20:33:50Z")

</div>

30 posts were split to a new topic: [Static Typing vs Dynamic Typing (split thread)](https://erlangforums.com/t/static-typing-vs-dynamic-typing-split-thread/849)

---

<div class="post-metadata">

**Author:** ![garazdawi](https://erlangforums.com/user_avatar/erlangforums.com/garazdawi/32/175_2.png) [@garazdawi](https://erlangforums.com/u/garazdawi)\
**Post date:** [December 13, 2021, 9:18am UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/29 "2021-12-13T09:18:26Z")

</div>

> [@kaashyapan](#):
>
> Wonder what the Erlang folks were trying with this…  
> [erlang-labs/typer: Erlang/OTP (github.com)](https://github.com/erlang-labs/typer)

I often wonder why the erlang-labs github repo score so high on google… it is a dead organization that we used to experiment with breaking Erlang/OTP into multiple repositories.

The repo that you are linking to is [Erlang -- typer](https://www.erlang.org/doc/man/typer.html), which is a tool to automatically annotate Erlang code with type annotations based on what dialyzer figures out.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://erlangforums.com/user_avatar/erlangforums.com/astonj/32/9_2.png) [@AstonJ](https://erlangforums.com/u/AstonJ)\
**Post date:** [December 21, 2021, 8:30pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/45 "2021-12-21T20:30:14Z")

</div>

Hi all, just a quick note to say I agree with Peer that it’s important to highlight the shortcomings of things like static typing but I also agree with Louis that a dedicated or linked thread for that may be best (a bit like our [What do you think should be in OTP?](https://erlangforums.com/t/what-do-you-think-should-be-in-otp/556) and [What do you think should not be in OTP?](https://erlangforums.com/t/what-do-you-think-should-not-be-in-otp/553) threads).

It’s also completely normal for threads to develop forks like this and so what we usually do is when it seems necessary we split them into dedicated thread/s. When I get a moment I’ll do that here and post a link back to that thread (I’ll also do a bit of general clean up so the threads can get back on track).

I’m going to move this thread to the moderation queue for now, then once it has been sorted out will move it back to the main forum. Thanks for your patience and understanding.

**Edit** : done - here’s the link to the split thread: [Static Typing discussion (split thread)](https://erlangforums.com/t/static-typing-discussion-split-thread/849)

---

<div class="post-metadata">

**Author:** ![michallepicki](https://erlangforums.com/letter_avatar_proxy/v4/letter/m/5f9b8f/32.png) [@michallepicki](https://erlangforums.com/u/michallepicki)\
**Post date:** [December 27, 2021, 12:37pm UTC](https://erlangforums.com/t/erlang-type-system-efforts/749/46 "2021-12-27T12:37:30Z")

</div>

I hope I’m not uncovering some not fully fleshed out plans, but here is a new effort related to CDuce and Elixir: [Giuseppe Castagna: Master project description](https://www.irif.fr/~gc/stageElixir.en.html) on “Set-theoretic types for the Elixir programming language”.

I slightly worry about the structural type checker performance, but I’m sure there are ways to make it fast enough (as shown e.g. by Typescript). And similarly with pretty printing “big” types, e.g. in error messages.

But I think this is very exciting news!
