Denis Merigoux
fffa318144
Don't print functions on CLI tracing mode; they're too big
2022-07-13 17:27:08 +02:00
Emile Rolley
4991350b58
feat(backend/ocaml): disambiguate OCaml record names derived from Catala struct
2022-07-12 16:12:18 +02:00
Louis Gesbert
d7dbbde26f
Merge pull request #285 from CatalaLang/fix_192
...
Partially fix #192
2022-07-11 16:43:48 +02:00
Denis Merigoux
66a7d2f7a3
Fix test encoding
2022-07-08 15:37:01 +02:00
Denis Merigoux
fa0d94a2b6
Remove authors feature whose behavior is not satisfactory
2022-07-08 14:41:19 +02:00
Denis Merigoux
bdbf202a8d
Minimal implementation of https://github.com/CatalaLang/catala/issues/192#issuecomment-1178750411
2022-07-08 14:10:25 +02:00
Denis Merigoux
a34a330dc4
Fix breaklines in LaTeX
2022-07-06 17:37:42 +02:00
Denis Merigoux
5e45940e1b
Merge branch 'master' into allocations_logement
2022-07-06 16:43:14 +02:00
Emile Rolley
97cf14b3f5
refactor(runtime): ignore function definition while parsing raw events
2022-06-23 17:35:11 +02:00
Emile Rolley
22100d5b62
feat(runtime/api_web): add serialization for event + retrieveEvents in the API
2022-06-16 17:24:35 +02:00
Emile Rolley
e35e4a7cb4
feat(runtime): clean parse_raw_events + add documentation
2022-06-16 11:39:37 +02:00
Emile Rolley
9b5779ed62
feat(runtime): format_events -> pp_events (Done).
2022-06-15 19:32:45 +02:00
Emile Rolley
d82ecb5f12
fix(compiler/log): retrieve types of input and output function calls
2022-06-15 14:34:15 +02:00
Emile Rolley
d1a7be688c
feat(runtime): start to implement format_events
2022-06-14 17:42:13 +02:00
Emile Rolley
092b57c898
feat(runtime): implement the raw_event parser
2022-06-13 17:59:00 +02:00
Emile Rolley
84f79be7b7
feat(runtime): define the event type
2022-06-09 17:17:12 +02:00
Emile Rolley
f7787ff80d
fix(compiler): fix line num for HTML generation
2022-06-08 17:21:15 +02:00
Denis Merigoux
34fd8a0bb2
Print a position when logging assignment of a default false for a condition
2022-06-03 17:50:03 +02:00
Denis Merigoux
ab0f4eb28c
Merge branch 'master' into allocations_logement
2022-06-01 17:28:54 +02:00
Denis Merigoux
6e4e646dd8
More robust implementation of duration multiplication
2022-06-01 15:15:22 +02:00
Denis Merigoux
878de024b7
Better error message
2022-06-01 11:13:14 +02:00
Jonathan Protzenko
0e68c07567
Reset parser messages
2022-06-01 10:26:14 +02:00
kescher
db9eec3b9f
add support for duration multiplication
...
Signed-off-by: Jonathan Protzenko <protz@microsoft.com>
2022-05-31 11:17:38 -07:00
Denis Merigoux
89db6d9b69
Fix logging regression involuntarily introduced by #268
2022-05-31 16:09:32 +02:00
Louis Gesbert
9ef8625df7
Compiler: support cumulative exceptions
...
Closes #208 (implementing Solution 1, without adding an explicit syntax)
Two exceptions or more, e.g. `(j1 |- c1)` and `(j2 |- c2)` such that `c1
= c2`, are collapsed by this transformation into `((j1 |- c1) | j2 |-
c2)`, introducing an arbitrary precedence that avoids the conflict.
The transormation is not applied if any exceptions apply to the subterms
themselves: while these exceptions could be merged, that would turn more
conflicts into arbitrary outcomes than wanted.
2022-05-30 14:22:34 +02:00
Denis Merigoux
fd7d9a6818
Add missing options
2022-05-26 19:10:53 +02:00
Denis Merigoux
ec225994af
Add "print_only_law" option
2022-05-26 19:05:06 +02:00
Louis Gesbert
cd70e16ea3
Compiler: simplify EDefault term at construction
...
This allows to match on their structure further on.
2022-05-25 18:36:07 +02:00
Louis Gesbert
2d41f53300
Compiler: add a few helper comparison functions
...
Adds syntactic comparison for some expressions, etc., allowing in
particular to detect syntactically equal expressions. Positions are,
obviously, ignored.
2022-05-25 18:35:57 +02:00
Louis Gesbert
4c43b533b0
Merge pull request #213 from AltGr/plugin-support
...
Add backend plugin support
2022-05-25 18:31:30 +02:00
Louis Gesbert
8124d4dab5
Compiler: add some doc on plugin support
2022-05-25 17:27:49 +02:00
Emile Rolley
92ebb4194b
refactor(api_web/runtime): runtime_value derive yojson_of
2022-05-25 14:26:58 +02:00
Louis Gesbert
5ae4393004
Add two demo backend plugins
...
- one that is just the same as the python backend
- one that is a quick'n'dirty call to js_of_ocaml on top of the ocaml backend to
generate js files
Use `make plugins` to test them. They are only expected to be useful as
demonstrations of how to write plugins.
2022-05-19 10:40:04 +02:00
Louis Gesbert
9a95a3554c
Add support for backend plugins using dynlink
2022-05-19 10:40:02 +02:00
Emile Rolley
144704f7fb
refactor(compiler): add the Utils.File module
...
+ Adds wrapper functions for formatter of file/out_channel
and uses it in both the compiler and the clerk drivers.
2022-05-19 10:04:34 +02:00
Denis Merigoux
166355fad0
Merge pull request #260 from AltGr/parser-tweaks
...
An attempt to fix some parser priorities
2022-05-18 14:45:02 +01:00
Denis Merigoux
2781485c0a
Update compiler/literate/literate_common.ml
...
Co-authored-by: Louis Gesbert <louis.gesbert@ocamlpro.com>
2022-05-18 15:32:58 +02:00
Denis Merigoux
b2ca8e36aa
Corrections suggested by @Altgr
2022-05-18 15:32:13 +02:00
Louis Gesbert
faa5b32638
Merge remote-tracking branch 'origin/master' into allocations_logement
2022-05-12 15:22:17 +02:00
Louis Gesbert
f9fc1a8e8b
Formatting: sync with master
2022-05-12 15:10:55 +02:00
Louis Gesbert
546347bbe2
Parser: allow chained if/then/else if/then/etc.
2022-05-11 19:26:34 +02:00
Louis Gesbert
05e3205fc9
Parser: priority tweaks
...
- makes sums and mults left-associative instead of right-associative (see the
change in the tests!)
- uses higher priority for unary operators
2022-05-11 19:26:34 +02:00
Louis Gesbert
f17875f90e
Formatting: some other personal preferences
2022-05-11 16:25:49 +02:00
Louis Gesbert
74c5629153
Formatting: reduce extra match-case indentation
...
2 is plenty enough, esp. for nested matches :)
2022-05-11 16:25:20 +02:00
Louis Gesbert
fa3693d813
Formatting: disable deprecated "smart" fun-decl option
2022-05-11 16:22:56 +02:00
Louis Gesbert
ac85d8dbb4
Upgrade ocamlformat version
2022-05-11 16:21:58 +02:00
Louis Gesbert
6cb0d581a6
Workaround some ocamlformat crashes
...
These files were not reformatted!
2022-05-11 16:21:07 +02:00
Louis Gesbert
6837af4e80
Upgrade Cmdliner dep
2022-05-09 11:39:18 +02:00
Denis Merigoux
96f1845afd
Merge branch 'master' into allocations_logement
2022-05-08 15:20:04 +02:00
Denis Merigoux
07198e326d
Fixed rounding bug in interpreter for negative values
2022-05-06 15:28:09 +02:00