mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
affa45c115
This is a first step into unifying trace handling. This patch only affects the interpreter, by delegating trace recording to the already existing runtime functions. At end of interpretation, it recovers the registered trace from the runtime, and prints it. NOTE: there are some limitations due to this approach, as runtime values going through this interface have to be converted to the "runtime embedded" type. In particular, functions can no longer be printed (which makes full sense if we want it to happen in the same way in compiled code) ; some information, like types, is lost, but it didn't appear to be used. Also, a specific printer had to be added for runtime values (but it's very simple so that shouldn't be a problem). @denismerigoux I'd like your input on how well this goes for your use-cases. Further work should probably be cleanup and unification of the runtime logging interfaces ; there is already code for re-structuring the traces, printing to JSON, etc. which could be common to runtime and interpreter. |
||
---|---|---|
.. | ||
catala_utils | ||
dcalc | ||
desugared | ||
lcalc | ||
literate | ||
plugins | ||
scalc | ||
scopelang | ||
shared_ast | ||
surface | ||
verification | ||
catala_web_interpreter.ml | ||
catala.ml | ||
driver.ml | ||
driver.mli | ||
dune | ||
index.mld | ||
plugin.ml | ||
plugin.mli | ||
tests.ml |