Process types playground

Type-checks the Elixir fragment of Sections 3–6 of the paper; decorations are optional, and inferred as in Section 8.

Syntax
$ Lbefore a def or an fn: its type, an intersection of arrows
$interface Tbefore a spawn: the interface of the spawned process
$self_interface Tthe interface of the main process (default term())
$type name = Ta type definition, possibly recursive (if contractive)
(s, … -> t)@[o, i]an arrow typed at the bracket [o, i]: in its body self() has type pid(o) and receive reads at i; without @[…], the decorations are inferred
(s, … -> t) @ uthe arrow (s, … -> t)@[u, u]; write @ (u₁ or u₂) for a union
pid(T), pid(), fun()pid types, the top process type, the top function type
:a, {T, …}, integer(), …as in Elixir, with or, and, not
x when is_integer(x)guards are type tests on variables
fn -> … endunannotated: its decorations are inferred
removing decorationsmay make checking much slower, or keep it from finishing: see the comments of the dispatcher example
Ctrl/⌘ + Entercheck now; checks also run as you type