ocaml-flambda / flambda-backend

The Flambda backend project for OCaml
93 stars 67 forks source link

Fix unsound modes in typecore #2699

Closed riaqn closed 2 weeks ago

riaqn commented 3 weeks ago

This PR fixes several unsoundness in modes in typecore.ml.

In particular, we treat lazy more coarsely than before: lazy body will always be legacy and we require body to be legacy. This trivializes some tests in uniqueness analysis, which we now remove. The code in uniqueness_analysis.ml treating Tpat_lazy and Texp_lazy doesn't need change.