josefs / Gradualizer

A Gradual type system for Erlang
MIT License
613 stars 35 forks source link

Make the solver results deterministic #511

Closed erszcz closed 1 year ago

erszcz commented 1 year ago

Since maps do not preserve item order, it might be the case that solving the same constraints might yield different results. To ensure repeatable results, let's sort the map keys based on which the work list of the solver is built.

Fixes #510.

This puts us at 35 lines of self-check warnings.