Commit Graph

3689 Commits

Author SHA1 Message Date
Louis Gesbert
cf89204a4b Reformat 2023-11-27 11:17:38 +01:00
Louis Gesbert
35b40785c7 Update tests (lcalc+avoid_exceptions outputs changed) 2023-11-27 11:17:38 +01:00
adelaett
8a85e7b78f typing defaults: update passing tests 2023-11-27 11:17:38 +01:00
adelaett
a734413d39 typing default: fix ocaml runtime when using eoption 2023-11-27 11:17:38 +01:00
adelaett
f254906952 typing defaults: update passing tests 2023-11-27 11:17:38 +01:00
adelaett
ae4956c40f Typing defaults: update ocaml & python runtimes. 2023-11-27 11:17:38 +01:00
adelaett
dda09f0cc1 typed defaults: update passing tests. 2023-11-27 11:17:34 +01:00
adelaett
324ca74053 typed defaults: fixed interpreter value initialization in lcalc mode
when having the avoid_exceptions flag enabled.
2023-11-27 11:12:35 +01:00
adelaett
576da177c5 Typed defaults: translate types in scope lets as well in the new
compile without exception passe
2023-11-27 11:12:35 +01:00
adelaett
f6027109d8 Typed default: Update passing tests
For now, most tests involving only one scope and no context do pass.
More work is required for the rest.
2023-11-27 11:12:26 +01:00
adelaett
cb29fdeefe fixing the handle_opt in the interpreter. 2023-11-27 11:09:08 +01:00
adelaett
1d72a57da4 Typed default: fix an issue to the error_on_empty constructor 2023-11-27 11:09:08 +01:00
adelaett
4a5335162e Typed default: implementing the type for handle defaults, as well as the
compile without exceptions compilation pass, using the newly found
invariant
2023-11-27 11:09:08 +01:00
adelaett
b0b83b14b9 Typed default: Implemented typing translating to the without exception compilation path. 2023-11-27 11:09:08 +01:00
adelaett
2c9f8ad8b1 Typed default: import the code from compile with exceptions to
re-implement without exceptions with the new typing of defaults terms.
2023-11-27 11:09:08 +01:00
Louis Gesbert
fca3221b78 Ensure dune exec -- clerk ... runs an up-to-date catala exec 2023-11-27 11:09:08 +01:00
Louis Gesbert
cc4e5339dd Typed defaults: small simplification and fixes 2023-11-27 11:09:08 +01:00
Louis Gesbert
3a149bc86e Fix compilation of plugins 2023-11-27 11:09:08 +01:00
Louis Gesbert
1efda5ca22 Typing defaults: support nested priorities
The way nested priorities are encoded use `< < excs | true :- nested > :- x >`,
which imply that `nested` can actually be ∅ ; to cope with this, the typing of
default terms is made more generic (the return type is now the same as the
`cons` type `'a`, rather than `<'a>`). For the general case, we add an explicit
`EPureDefault` node which just encapsulates its argument (a `return`, in monad
terminology).
2023-11-27 11:09:08 +01:00
Louis Gesbert
4ececf9960 Fix api_web plugin 2023-11-27 11:09:08 +01:00
Louis Gesbert
c4715ea86e Reformat 2023-11-27 11:09:08 +01:00
Louis Gesbert
bcf285913e Typing the HandleDefault operator 2023-11-27 11:06:33 +01:00
Louis Gesbert
fd50e6186f Fix default typing across modules 2023-11-27 11:06:33 +01:00
Louis Gesbert
9203e4f7bb Verification: support unboxed defaults 2023-11-27 11:06:33 +01:00
Louis Gesbert
dc3ffa0dcd Fix some error handling on scope calls
(and add suggestions)
2023-11-27 11:06:33 +01:00
Louis Gesbert
d00cac09ad Harmless test results changes 2023-11-27 11:06:33 +01:00
Louis Gesbert
958aaebac3 Typing defaults fixes: keep in and out type in scope sigs 2023-11-27 11:06:16 +01:00
Louis Gesbert
ab6bec390d Adjust plugins and warnings 2023-11-27 11:06:16 +01:00
Louis Gesbert
0be2636e65 Typing defaults: making the compiler adhere to the new type discipline 2023-11-27 11:06:01 +01:00
Louis Gesbert
52486af6ac Correct typing of context subscope variables 2023-11-27 11:06:01 +01:00
Louis Gesbert
b98bad8c33 Add a --no-typing option
it is useful e.g. to be able to print intermediate ASTs when they don't type, to
debug the typing errors. This is better than commenting the typing line each
time.

Note that the option is not available on all targets (esp. not for ocaml and
python outputs ; it's allowed on the interpreters for debugging purposes but I'm
not sure if that's a good idea)
2023-11-27 11:06:01 +01:00
Louis Gesbert
9425753eca Typer: add built-in "'a default" type 2023-11-27 11:06:01 +01:00
Louis Gesbert
e2730c0b44 Avoid redundant position in type error 2023-11-27 11:05:58 +01:00
Louis Gesbert
4fa9326618 Typer: on error, print the expression being typed in debug mode
useful when typing fails on internally generated expressions
2023-11-27 11:03:47 +01:00
Denis Merigoux
63f0cad312
Debug French housing benefits by comparing to the CAF API (#531) 2023-11-24 16:52:29 +01:00
Denis Merigoux
2b89e530b0
Code refactoring that works at execution + mypy 2023-11-23 15:38:45 +01:00
Denis Merigoux
fb85c64cfa
Continue debugging 2023-11-23 11:54:54 +01:00
Denis Merigoux
bb414eed06
Improve CNAF<->Catala rules, remove treacherous isinstance() 2023-11-22 18:32:52 +01:00
Denis Merigoux
14dffc2223
Fix links to CNAV 2023-11-22 18:09:04 +01:00
Denis Merigoux
fc242a5d1f
Fix Python compilation and runtime 2023-11-22 18:08:44 +01:00
Denis Merigoux
67d1665afc
Progress 2023-11-22 15:02:40 +01:00
Denis Merigoux
cf70e6cbb1
Fix bug in taux_loyer_éligible!
The formulae in the law is complex and there was a transcription error
2023-11-22 14:52:25 +01:00
Denis Merigoux
b25944a148
Fix bug in taux_loyer_éligible!
The formulae in the law is complex and there was a transcription error
2023-11-22 14:51:02 +01:00
Denis Merigoux
b055558ebf
Merge branch 'master' into api_apl 2023-11-22 11:31:02 +01:00
Denis Merigoux
03173e50d0
Mise à jour arrêté du 22 septembre 2023 (#530) 2023-11-22 11:27:52 +01:00
Denis Merigoux
4cff84291a
Mise à jour arrêté du 22 septembre 2023 2023-11-22 11:11:43 +01:00
Denis Merigoux
15921b4fda
Improve simulation 2023-11-22 10:11:20 +01:00
Denis Merigoux
d2e4da144c
Directly call the API 2023-11-21 12:15:36 +01:00
Denis Merigoux
9b287cc0a5
Refresh the code 2023-11-21 10:49:32 +01:00
adelaett
363ece217e
fix nix environment 2023-11-16 16:52:23 +01:00