· ai-devtools

Type inference and narrowing with reverse arrows

November 10, 2026 by José Valim, Guillaume Duboc in Internals This article explains how Elixir implements type inference and type narrowing using reverse arrows: a small set of composable ideas, rather than special cases hardcoded into the type checker.


Thanks to this work, the upcoming Elixir v1.21 passes all tests in the If-T: Type Narrowing Benchmark by Guo et al.. This means v1.21 can find even more sure bugs in existing Elixir programs and, once type signatures are introduced, narrowing will give us more precise types and fewer false positives.

The type system was made possible thanks to a partnership between CNRS and Remote. The development work is now sponsored by Fresha, Supermethod and Dashbit.

Elixir performs type inference by refining the dynamic type. This is quite different from how inference and gradual typing are implemented in most type systems, so let’s break it down. In many gradual languages, the dynamic type, often known as any, is a “black box” and can be used in any context.

Earlier coverage

Related coverage

Also worth reading

  1. next.js 16.5.0-canary.59 released
  2. next.js 16.5.0-canary.56 released
  3. Qualcomm offers test drive of its rack-scale Nvidia AI challenger
  4. Design for Understandability
  5. Microsoft agent-framework Python versions 1.26.1, 1.26.2 contain credential stealer