catala/compiler
Louis Gesbert db34c9a848 Generalise the expression printer
This patch functorises the generic expression printer, in order to be able to
re-use it for end-user printing.

It makes it possible to have an end-user, localised printer that shares the code
for e.g. priority and automatic parens handling.

A generic AST rewriting that disambiguates variables (very simple to write with
bindlib) is also added and used in the OCaml backend for something safer than
just appending `_user` (-- this also handles clashing variables that could be
introduced during compilation which would have generated wrong code before this)

Finally, the `explain` plugin is adapted to use the new printer.

Ah, and `String.format_t` was tweaked to correctly print strings that might
contain unicode without breaking alignment, and should be used instead of
`format_string` or `%s` whenever unicode can be expected.
2023-07-11 17:33:56 +02:00
..
catala_utils Generalise the expression printer 2023-07-11 17:33:56 +02:00
dcalc Refacter the main Driver module 2023-07-03 16:42:54 +02:00
desugared Fix formatting of exception trees 2023-07-07 14:56:54 +02:00
lcalc Generalise the expression printer 2023-07-11 17:33:56 +02:00
literate Formatting 2023-06-15 10:51:31 +02:00
plugins Generalise the expression printer 2023-07-11 17:33:56 +02:00
scalc Refacter the main Driver module 2023-07-03 16:42:54 +02:00
scopelang Refacter the main Driver module 2023-07-03 16:42:54 +02:00
shared_ast Generalise the expression printer 2023-07-11 17:33:56 +02:00
surface Refacter the main Driver module 2023-07-03 16:42:54 +02:00
verification Add an explain plugin 2023-07-11 17:33:56 +02:00
catala_web_interpreter.ml Refacter the main Driver module 2023-07-03 16:42:54 +02:00
catala.ml reformat (sync with master) 2022-03-09 10:43:17 +01:00
driver.ml Restore full expression printing when --debug is set 2023-07-03 17:30:17 +02:00
driver.mli Generalise the expression printer 2023-07-11 17:33:56 +02:00
dune Add an explain plugin 2023-07-11 17:33:56 +02:00
index.mld More doc 2023-06-18 16:08:16 +02:00
plugin.ml Refacter the main Driver module 2023-07-03 16:42:54 +02:00
plugin.mli Refacter the main Driver module 2023-07-03 16:42:54 +02:00
tests.ml Fusion of all optimizations done correctly 2023-04-21 12:32:09 +02:00