catala/compiler/shared_ast
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
..
definitions.ml Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
dune Rename utils to catala_utils 2022-11-28 16:38:09 +01:00
expr.ml Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
expr.mli Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
operator.ml Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
operator.mli Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
print.ml Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
print.mli Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
program.ml AST refactoring 2022-11-17 18:16:09 +01:00
program.mli AST refactoring 2022-11-17 18:16:09 +01:00
scope.ml Rename utils to catala_utils 2022-11-28 16:38:09 +01:00
scope.mli Rename utils to catala_utils 2022-11-28 16:38:09 +01:00
shared_ast.ml Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
shared_ast.mld Rename marked_expr -> expr, expr -> naked_expr throughout 2022-08-29 11:29:23 +02:00
type.ml Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
type.mli Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
typing.ml Add overloaded operators for the common operations 2022-12-13 11:55:24 +01:00
typing.mli Add typing-based disambiguation pass after desugaring 2022-11-28 16:38:09 +01:00
var.ml Make all supertypes use ('a, 't) gexpr as parameter instead of naked_gexpr 2022-08-29 11:29:24 +02:00
var.mli Make all supertypes use ('a, 't) gexpr as parameter instead of naked_gexpr 2022-08-29 11:29:24 +02:00