Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
value letrec: fix a bug in analysis of inner mutually-recursive bindings #2244
On Friday I found a bug in my own proof of correctness of the recursive-value-declarations analysis of #1942, and @yallop swiftly turned it into a example that crashes 4.08+dev. The present PR (explains and) fixes the issue in the same way that I fixed the type system and the proof.
The issue is in the handling of inner
The new unsafe program in the testsuite is rejected in 4.07.1, which still uses @yallop's pre-#1942 implementation, which is more conservative -- it is equivalent to the "overapproximation" mentioned above. On the other hand, the new safe program in the testsuite was rejected in 4.07.1, because the overapproximation is too conservative there -- maybe it's okay.
We should have a fix for this issue in 4.08.