The exhaustiveness checker will crash when trying to retrieve a type's definition from a module that has been compiled in a previous compiler pass. Roughly: when one module depends on a type from another which has already been compiled, the exhaustiveness checker can't find the module from which to retrieve the type.
E.g.
module A
export_type a
type a = A int
and
module B
import_type A.a
let addXToA x A y = A (x + y)
if A is compiled from a previous run and then we add B (or make changes to it), A won't be in the list of modules for the exhaustiveness checker and a list lookup will fail. I suspect we need to add an annotation to the beam files with erlang terms for all the exported ADTs unless it's already there and I'm overlooking it (@lepoetemaudit pinging you in case I'm just ignorant of something that already exists).
The exhaustiveness checker will crash when trying to retrieve a type's definition from a module that has been compiled in a previous compiler pass. Roughly: when one module depends on a type from another which has already been compiled, the exhaustiveness checker can't find the module from which to retrieve the type.
E.g.
and
if
A
is compiled from a previous run and then we addB
(or make changes to it),A
won't be in the list of modules for the exhaustiveness checker and a list lookup will fail. I suspect we need to add an annotation to the beam files with erlang terms for all the exported ADTs unless it's already there and I'm overlooking it (@lepoetemaudit pinging you in case I'm just ignorant of something that already exists).