catala/compiler
Louis Gesbert fea01cfe4c Add overloaded operators for the common operations
This uses the same disambiguation mechanism put in place for
structures, calling the typer on individual rules on the desugared AST
to propagate types, in order to resolve ambiguous operators like `+`
to their strongly typed counterparts (`+!`, `+.`, `+$`, `+@`, `+$`) in
the translation to scopelang.

The patch includes some normalisation of the definition of all the
operators, and classifies them based on their typing policy instead of
their arity. It also adds a little more flexibility:
- a couple new operators, like `-` on date and duration
- optional type annotation on some aggregation constructions

The `Shared_ast` lib is also lightly restructured, with the `Expr`
module split into `Type`, `Operator` and `Expr`.
2022-12-13 11:55:24 +01:00
..
catala_utils Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
dcalc Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
desugared Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
lcalc Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
literate Tweak error message location printing 2022-11-28 16:38:09 +01:00
plugins Define Catala_utils.String as an overlay to stdlib string 2022-11-28 16:38:09 +01:00
scalc Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
scopelang Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
shared_ast Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
surface Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
verification Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
catala_web_interpreter.ml Tweak error message location printing 2022-11-28 16:38:09 +01:00
catala.ml reformat (sync with master) 2022-03-09 10:43:17 +01:00
driver.ml Add typing-based disambiguation pass after desugaring 2022-11-28 16:38:09 +01:00
driver.mli Tweak error message location printing 2022-11-28 16:38:09 +01:00
dune Rename utils to catala_utils 2022-11-28 16:38:09 +01:00
index.mld Rename utils to catala_utils 2022-11-28 16:38:09 +01:00
plugin.ml Rename utils to catala_utils 2022-11-28 16:38:09 +01:00
plugin.mli Rename utils to catala_utils 2022-11-28 16:38:09 +01:00