ahrefs/atd

Use the ocaml-tsort library to sort dependencies

mjambon opened this issue · 0 comments

The current implementation used to sort the groups of mutually-recursive type definitions is weird and I suspect is incorrect, leading to bugs such as #308. The ocaml-tsort library (opam: tsort) has a clean implementation based on well-known algorithms, so we should use it. It comes with a dependency on the containers library which I don't think should be a problem.