catala/compiler/shared_ast
Louis Gesbert c63d74647d Optim: avoid extra translations in the interpreter
A recent patch introduced custom terms in expressions manipulated by the
interpreter. For typing reasons, a traversal is done to extend the supplied
expression with these custom terms — it's functionally the identity, but, due to
the fact that the type-checker can't infer covariance of our AST terms on their
phantom parameter, playing by the rules imposes a full traversal + rebuild.

Without resorting to a (constrained) `Obj.magic`, this patch avoids extra
intermediate conversions, which is enough to cut out the huge extra cost we were
incurring.

Closes #516
2023-09-19 18:22:43 +02:00
..
definitions.ml replace let _ by let () or add type annotation 2023-09-09 22:02:39 +02:00
dune Fix most doc errors 2023-06-02 17:17:45 +02:00
expr.ml Reformat 2023-08-31 18:31:48 +02:00
expr.mli Simplification: store paths in Uids 2023-08-31 18:31:48 +02:00
interpreter.ml Optim: avoid extra translations in the interpreter 2023-09-19 18:22:43 +02:00
interpreter.mli Refacter the main Driver module 2023-07-03 16:42:54 +02:00
operator.ml Merge branch 'master' into closure_conversion 2023-06-15 17:56:41 +02:00
operator.mli Fix most doc errors 2023-06-02 17:17:45 +02:00
optimizations.ml replace let _ by let () or add type annotation 2023-09-09 22:02:39 +02:00
optimizations.mli Improve integration of marks into the main AST 2023-05-17 17:37:00 +02:00
print.ml Reformat 2023-09-01 16:24:27 +02:00
print.mli Select colors for Uids upon instanciation 2023-09-01 14:41:56 +02:00
program.ml Reformat 2023-08-31 18:31:48 +02:00
program.mli Simplification: store paths in Uids 2023-08-31 18:31:48 +02:00
qident.ml Add some helper functions in a wrapper Map module 2023-07-12 11:51:15 +02:00
qident.mli Some commented code cleanup and clarifications 2023-06-19 16:36:09 +02:00
scope.ml Reformat 2023-09-01 16:24:27 +02:00
scope.mli Some fixes & cleanup after early review 2023-08-31 17:55:36 +02:00
shared_ast.ml Wip support for modules 2023-06-15 17:56:57 +02:00
shared_ast.mld Fix most doc errors 2023-06-02 17:17:45 +02:00
type.ml Adding typing for closure env 2023-06-15 11:11:56 +02:00
type.mli - [x] shared_ast 2023-02-20 15:57:42 +01:00
typing.ml Select colors for Uids upon instanciation 2023-09-01 14:41:56 +02:00
typing.mli Fixes related to environments and lookups 2023-08-31 18:31:48 +02:00
var.ml Fixes related to environments and lookups 2023-08-31 18:31:48 +02:00
var.mli Fixes related to environments and lookups 2023-08-31 18:31:48 +02:00