catala/compiler/desugared
Louis Gesbert 371f9554b8 Support for list recombinations
The primary use-case for this was to be able to run computations on a list of
structures, then return an updated list with some fields in the structures
modified : that is what we need for distribution of tax amounts among household
members, for example.

This patch has a few components:

- Addition of a test as an example for tax distributions

- Added a transformation, performed during desugaring, that -- where lists are
  syntactically expected, i.e. after the `among` keyword -- turns a (syntactic)
  tuple of lists into a list of tuples ("zipping" the lists)

- Arg-extremum transformation was also fixed to use an intermediate list instead
  of computing the predicate twice

- For convenience, allow to bind multiple variables in most* list
  operations (previously only `let in` and functions allowed it)

- Fixed the printer for tuples to differentiate them from lists

*Note: tuples are not yet allowed on the left-hand side of filters and
arg-extremums for annoying syntax conflict reasons.
2024-01-26 11:29:33 +01:00
..
ast.ml Rework resolution of module elements 2023-11-30 21:14:12 +01:00
ast.mli Reformat 2023-11-30 23:53:38 +01:00
dependency.ml Reformat 2023-09-01 16:24:27 +02:00
dependency.mli Reformat 2023-09-01 16:24:27 +02:00
desugared.mld Fix most doc errors 2023-06-02 17:17:45 +02:00
disambiguate.ml AST change: more specific application 2023-12-19 17:27:40 +01:00
disambiguate.mli AST change: more specific application 2023-12-19 17:27:40 +01:00
dune Rename utils to catala_utils 2022-11-28 16:38:09 +01:00
from_surface.ml Support for list recombinations 2024-01-26 11:29:33 +01:00
from_surface.mli Uniform naming of conversion modules across compilation passes 2022-11-22 12:08:18 +01:00
linting.ml Rework resolution of module elements 2023-11-30 21:14:12 +01:00
linting.mli Update error messages 2023-03-31 14:01:04 +02:00
name_resolution.ml Add tuples to the surface language 2023-12-19 17:25:44 +01:00
name_resolution.mli Reformat 2023-11-30 23:53:38 +01:00
print.ml Select colors for Uids upon instanciation 2023-09-01 14:41:56 +02:00
print.mli Refactoring changes after @altgr's suggestions 2023-04-18 10:31:44 +02:00