Closed HarrisL2 closed 8 months ago
@waterlens can you please have a very quick look at whether you see anything unreasonable or broken? We want to merge this soon. It's temporary code anyway since the whole approach will be refactored. Probably the most interesting/important stuff about this PR is the test suite.
In-progress refactoring of the previous defunctionalization code which used its own IR. This implementation uses the base AST instead and can be fed back into the typer.
Points of Interest: Added new content to
shared/src/main/scala/mlscript/syntax.scala
to represent the bounds of evaluating a term Addedvar BoundedTerm
toTermImpl
to store evaluation result Added new flags:nm
,:lift
that allow the transformed AST to be used in the following stages Use flag:dd
to debug the defunctionalization processcompiler/shared/test/diff/NuMono/Differentiation.mls
A use case test that exposes many bugs with in the implementation, being worked on right now.