Commit Graph

3985 Commits

Author SHA1 Message Date
Louis Gesbert
b43cc04e16 Clerk tests: use separate dirs for different flags, to preserve caching
The default output remains at the top of _build if no specific flags have been
given, the others are in `_build/test<flags>`
2024-02-26 14:56:43 +01:00
Louis Gesbert
1ea77201ff Lcalc interpreter: fix passing of context arguments 2024-02-26 14:56:43 +01:00
Louis Gesbert
07b71656e7 Native/interpreter interface: handle option types 2024-02-26 14:56:43 +01:00
Louis Gesbert
ba9fc85b84 Make exception output consistent across the interpreters 2024-02-26 14:56:43 +01:00
Louis Gesbert
20c1dee5cb Tests: add catala test-scope pseudo-command for inline tests 2024-02-26 14:56:43 +01:00
Louis Gesbert
4a049080a4 CLI: replace interpret_lcalc by interpret --lcalc
This will make it easier when running tests to just toggle the different flags
2024-02-26 14:56:43 +01:00
Louis Gesbert
97ae62384e Add externals to scalc, working test with Python backend 2024-02-26 14:56:43 +01:00
Louis Gesbert
589833bca7 Make plugin load failures less verbose
In general you don't care unless you may have attempted to use one.
2024-02-26 14:56:43 +01:00
Louis Gesbert
c78a6b62c9
Small ocaml/js output rehaul (#582) 2024-02-22 12:15:31 +01:00
Louis Gesbert
cafad727fe Update the generation process of the website assets
Now they're more simply bundled into a `tar` file generated from the `Makefile`.
2024-02-21 11:28:56 +01:00
Louis Gesbert
e0928677b1 Small ocaml/js output rehaul
Print to json directly rather than depend on yojson and a ppx.

Note: this should be tested with the website in order to validate that the Json
output is 1-to-1.
(a second step could be to simplify this output, now that it's manual)
2024-02-21 11:28:56 +01:00
Louis Gesbert
98ad084062 Clerk: add python targets 2024-02-19 10:44:20 +01:00
Louis Gesbert
4ee4992b54 Tweak multi-module LaTeX output 2024-02-16 16:36:15 +01:00
Louis Gesbert
f09edf443e Fix typo 2024-02-16 16:12:35 +01:00
Louis Gesbert
5f7fca0fe6
Allow generation of one latex file from multiple sources, and fixes (#583) 2024-02-16 14:14:38 +01:00
Louis Gesbert
60371189ab Allow generation of one latex file from multiple sources 2024-02-15 20:54:24 +01:00
Louis Gesbert
5128da2ebe Correctly fail if extra arguments are supplied 2024-02-15 20:54:14 +01:00
Louis Gesbert
18ec4b3dd3 LaTeX backend: fix module name escaping 2024-02-15 20:54:14 +01:00
Louis Gesbert
518bb64ecc
Fix LaTeX literate output with tests (#581) 2024-02-15 15:21:19 +01:00
Louis Gesbert
eb4ba114d2 Add test for literate LaTeX output 2024-02-15 14:53:26 +01:00
Louis Gesbert
a2d82d01f5 pandoc: disable highlight of custom fenced blocks for now 2024-02-15 13:54:44 +01:00
Louis Gesbert
23287ef817 Literate output: add info about modules 2024-02-15 13:54:44 +01:00
Louis Gesbert
fe289e5eec
Syntax: add keywords in front of list filtering / arg-extremum (#580) 2024-02-15 09:37:21 +01:00
Louis Gesbert
584ba7dfbc Some fixes to 'make alltest' 2024-02-14 14:57:40 +01:00
Louis Gesbert
2f2924944a Syntax: add keywords in front of list filtering / arg-extremum
Closes #574
2024-02-14 13:55:03 +01:00
Louis Gesbert
fa3be9bb79 Fix CI badge in Readme file 2024-02-13 17:22:57 +01:00
Louis Gesbert
1087604060
Allow access to intermediate variable states (#578) 2024-02-13 11:04:51 +01:00
Louis Gesbert
bf0ef0b1f5 Allow access to intermediate variable states
Through the syntax `var_name state state_name`.

Addresses #567, but
- requires documentation
- explicitely accessing states of the variable being defined is not allowed at
  the moment (warning proposed in #567 requires a whole-expression check, which
  is better done some place else entirely)
2024-02-12 18:15:48 +01:00
Louis Gesbert
36866a919b Tests: remove redundant part in filenames 2024-02-12 18:03:16 +01:00
Louis Gesbert
9c84457c36 Clerk: improve progress messages 2024-02-12 18:00:27 +01:00
Louis Gesbert
0d42ea0c29 Small CI fix 2024-02-12 17:25:20 +01:00
Louis Gesbert
afcc435593 CI: fix the check for bad promoted files 2024-02-12 16:44:14 +01:00
Louis Gesbert
c64503adf1
Generalise the definition of lists of nested binders (#576) 2024-02-12 16:31:42 +01:00
Louis Gesbert
721597a70d Small additional simplification 2024-02-12 15:39:29 +01:00
Louis Gesbert
b04ee2afd1 Makefile: add convenience rule to simulate CI tests
Run `make alltest` to include catala examples and french-law stuff!
2024-02-12 14:23:49 +01:00
Louis Gesbert
d9700c2001 CI: when a same-name branch exists on catala-examples, use that
This offers a workaround when a PR on Catala needs a change to the examples or
french-law: you would have the CI broken either on the PR or on master.

With this, you can ensure that the CI passes without breaking master, and then
merge the branch on catala-examples/french-law simultaneously to the PR on
Catala.
2024-02-12 11:29:10 +01:00
Louis Gesbert
71551ccce8 Makefile: add an 'alltest' convenience rule that tests catala-examples
Convenient before filing a PR
2024-02-12 11:16:04 +01:00
Louis Gesbert
9ca952b518 Fix building of plug-ins 2024-02-12 10:48:12 +01:00
Louis Gesbert
f7672857a7 Formatting 2024-02-09 18:36:12 +01:00
Louis Gesbert
e308ff8d02 Generalise the definition of lists of nested binders 2024-02-09 18:33:41 +01:00
Louis Gesbert
c124943a6e Repair broken unit-test 2024-02-09 18:32:19 +01:00
Louis Gesbert
68aaf6e2f0
Typing: add a "assume operator types" mode (#575) 2024-02-09 18:07:22 +01:00
Louis Gesbert
82fb66daef Clerk: fix options passed to catala in out-test mode 2024-02-09 10:54:58 +01:00
Louis Gesbert
12974b089f Printer: skip unit variables for conciseness 2024-02-07 17:54:12 +01:00
Louis Gesbert
a56d95d790 Typing: add a "assume operator types" mode
This allows for retyping after monomorphisation: a new function just extracts
the return type of the operator, without checking the operand types.

Also to avoid multiplying function arguments around the typer, the flags have
been gathered in a record that is included in the typing environment; it's ok to
give them default values as long as these are the strictest.
2024-02-07 17:41:04 +01:00
Louis Gesbert
ae89c870c1
Correctly pass types through monomorphisation (#573) 2024-02-07 15:54:05 +01:00
Louis Gesbert
ea512bfd5b The typer doesn't handle monomorphised code yet
so don't retype after monomorphisation, which is now possible as the pass itself
correctly preserves types.

In time the typer will need a special case to get knowledge of the new types and
modified operator types.
2024-02-06 18:00:45 +01:00
Louis Gesbert
df70c5dd57 Simplify monomorphisation, and preserve type annotations 2024-02-06 18:00:25 +01:00
Louis Gesbert
22674cd15d
Some small cleanup & QoL changes (#572) 2024-02-06 16:11:42 +01:00
Louis Gesbert
e5fe02fd84 Interpreter: avoid rebuilding unchanged values
Closes #540 ; it was a leftover from when we were still exploring how best to
type this function.
2024-02-05 16:28:56 +01:00