catala/compiler/surface
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
..
.ocamlformat-ignore Workaround some ocamlformat crashes 2022-05-11 16:21:07 +02:00
ast.ml Support for list recombinations 2024-01-26 11:29:33 +01:00
dune Rework the AST Gadt to allow merging of different ASTs 2023-03-30 15:30:08 +02:00
fill_error_tokens.py Big renaming and dir reorg 2021-06-21 11:39:06 +02:00
fill_positions.ml Simplify visitors ppx annotations 2023-08-04 11:43:16 +02:00
fill_positions.mli Big reformatting 2022-03-08 15:03:14 +01:00
lexer_common.ml Document and first test for externals 2023-12-06 11:06:54 +01:00
lexer_common.mli Document and first test for externals 2023-12-06 11:06:54 +01:00
lexer_en.cppo.ml Change type syntax of collection into list of 2023-12-19 15:26:44 +01:00
lexer_en.mli Big reformatting 2022-03-08 15:03:14 +01:00
lexer_fr.cppo.ml Change type syntax of collection into list of 2023-12-19 15:26:44 +01:00
lexer_fr.mli Big reformatting 2022-03-08 15:03:14 +01:00
lexer_pl.cppo.ml Change type syntax of collection into list of 2023-12-19 15:26:44 +01:00
lexer_pl.mli Big reformatting 2022-03-08 15:03:14 +01:00
lexer.cppo.ml Change type syntax of collection into list of 2023-12-19 15:26:44 +01:00
parser_driver.ml Document and first test for externals 2023-12-06 11:06:54 +01:00
parser_driver.mli Reformat 2023-11-30 23:53:38 +01:00
parser_errors.mli Big reformatting 2022-03-08 15:03:14 +01:00
parser.messages Allow deconstruction of tuples using let in 2023-12-19 17:25:44 +01:00
parser.mly Support for list recombinations 2024-01-26 11:29:33 +01:00
print.ml Rework and normalise the Marked interface 2023-05-17 17:37:00 +02:00
print.mli Big reformatting 2022-03-08 15:03:14 +01:00
surface.mld Fix most doc errors 2023-06-02 17:17:45 +02:00
tokens.mly Change type syntax of collection into list of 2023-12-19 15:26:44 +01:00