Commit Graph

2506 Commits

Author SHA1 Message Date
Louis Gesbert
a6702808ef Handle additional scopelang cases in helper functions 2022-08-26 11:31:14 +02:00
Louis Gesbert
49e37c71b4 Add scopelang / desugared cases to the shared AST expressions 2022-08-26 11:31:14 +02:00
Louis Gesbert
79677063d8
Rationalise the tuple / enum types (#320)
This will allow to unify with types used earlier in the
pipeline (`Scopelang.Ast.typ`).

It seems cleaner! But some areas may warrant a later clean-up, in particular
handling of options and their types in the backends, or possible name conflicts
of structs/enums with built-in types when printing.
2022-08-26 11:29:58 +02:00
Louis Gesbert
54eee2edea Rationalise the tuple / enum types
This will allow to unify with types used earlier in the
pipeline (`Scopelang.Ast.typ`).

It seems cleaner! But some areas may warrant a later clean-up, in particular
handling of options and their types in the backends, or possible name conflicts
of structs/enums with built-in types when printing.
2022-08-23 15:48:06 +02:00
Louis Gesbert
e6f560675f
Follow-up on the AST factoring (#318)
After the tedious part comes the cool stuff: reducing the number of code lines!
2022-08-23 13:39:39 +02:00
Louis Gesbert
4caf828e48 Additional cleanup/fixes on the compiler refactoring
following review ^^
2022-08-23 00:13:02 +02:00
Louis Gesbert
576e0fb3ff Factorise AST printers
Note that there were significant differences between the two printers (see the test diff!). Overall the `dcalc` one seemed newer so that's what I took, with only the required additions from `lcalc` (exceptions, raise and catch)
2022-08-22 19:28:27 +02:00
Louis Gesbert
ae2801be6d Move mode handling code from dcalc to shared_ast
Handling code should now be reasonably well sorted between `Shared_ast.{Var,Expr,Scope,Program}`

The function parameters (e.g. `make_let_in`) could be removed from the
scope handling functions since now the types are compatible, which
makes them much easier to read.
2022-08-22 19:28:27 +02:00
Louis Gesbert
d02c02e352 Fix some warnings 2022-08-22 19:28:27 +02:00
Louis Gesbert
8e7f65d204 Split Shared_ast.Expr of scope and program functions 2022-08-22 19:28:27 +02:00
Louis Gesbert
4bb49c14f1 Simplify some type aliases 2022-08-22 19:28:27 +02:00
Louis Gesbert
a74ccd30eb Add some documentation on the new lib 2022-08-22 19:28:27 +02:00
Louis Gesbert
06dbab74d2 reformat 2022-08-22 19:28:27 +02:00
Louis Gesbert
2b6ee8dd4b Leverage the shared AST: big cleanup (part I) 2022-08-22 19:28:21 +02:00
Louis Gesbert
988e5eff1c Split the shared AST into a separate lib 2022-08-22 19:16:28 +02:00
Denis Merigoux
4455b8fb0c
Stub before correct replacement 2022-08-19 15:21:38 +02:00
Denis Merigoux
755b1212a2
Remove division durations 2022-08-19 15:21:29 +02:00
Denis Merigoux
e5aed3efcb
Merge branch 'master' into rmonat_dates_calc_lib 2022-08-19 14:59:46 +02:00
Denis Merigoux
9008a7f0e6
Improving French housing benefits (#314)
Follow-up of #287, #266 and #165.
Time spent
Pair programming sessions

Before 2022-07-11: 50h (50 h for each person of the pair programming duo)

Refactoring sessions

Before 2022-07-11: 24 h
2022-07-14: 3 h

Legal research sessions

Before 2022-07-11: 21,5 h

Testing and debugging

Before 2022-07-11: 13,5 h
2022-07-11: 3 h with Denis
2022-07-13: 2 h with Denis
2022-07-14: 1 h with Denis
2022-07-16: 2 h with Denis
2022-07-19: 2 h with Denis
2022-07-21: 2 h with Denis
2022-08-11: 6 h with Denis
2022-08-15: 4 h with Denis
2022-08-16: 2 h with Denis

UI and form

2022-08-09: 8 h with Denis
2022-08-10: 8 h with Denis
2022-08-15: 2 h with Denis
2022-08-16: 2 h with Denis
2022-08-17: 6 h with Denis
2022-08-18: 4 h with Denis
2022-08-19 14:57:48 +02:00
Denis Merigoux
b5c4608ce1
Message 2022-08-19 14:43:56 +02:00
Denis Merigoux
a804199c34
Add test for precedence of local variabes vs. local scopes (#319)
Ref. #317
2022-08-19 12:29:44 +02:00
Denis Merigoux
062fea89d7
No RLS for logement-foyers 2022-08-19 11:54:15 +02:00
Denis Merigoux
d6ad4604ce
Only social conventions for logement-foyers 2022-08-19 11:39:04 +02:00
Louis Gesbert
d9c1426c66 Add test for precedence of local variabes vs. local scopes
Ref. #317
2022-08-19 11:08:28 +02:00
Raphaël Monat
0b73fbbac4 Add support for first and last day of month operators 2022-08-18 21:22:50 +02:00
Denis Merigoux
1553f88cf5
Remove unnecessary input 2022-08-18 18:53:30 +02:00
Denis Merigoux
2bc1b7d7f7
RLS only for social housing 2022-08-18 16:00:52 +02:00
Denis Merigoux
62ff234319
Shuffle data around 2022-08-18 15:27:01 +02:00
Denis Merigoux
1d63c48b9c
Fix test 2022-08-18 11:55:19 +02:00
Denis Merigoux
c36f6b683b
Don't minify as much with js_of_ocaml to workaround Webpack bug 2022-08-16 19:11:58 +02:00
Denis Merigoux
331789bfee
Remove input data duplicate 2022-08-16 17:39:18 +02:00
Denis Merigoux
caded9c6e2
End of lines 2022-08-16 17:02:36 +02:00
Denis Merigoux
82940b63e3
Remove mode_occupation from AL/APL logement-foyer's input
In favor of a more restricted input
2022-08-16 17:01:53 +02:00
Denis Merigoux
54e08585c6
Put sectorial information where it belongs 2022-08-16 16:22:51 +02:00
Denis Merigoux
92189e6439
Fix bug introduced by a1ebb67 2022-08-16 14:40:12 +02:00
Denis Merigoux
7ee971c4e1
Remove unused type definitions 2022-08-16 14:33:37 +02:00
Denis Merigoux
437be673ce
Merge branch 'master' into aides_logement 2022-08-16 14:25:06 +02:00
Denis Merigoux
2c40802c57
Fix again line numbers in HTML 2022-08-16 11:46:20 +02:00
Denis Merigoux
efa7cec4c1
Merge pull request #315 from AltGr/ast-factorisation
Factorise ASTs (between dcalc and lcalc)
2022-08-16 11:42:51 +02:00
Denis Merigoux
a1ebb6715c
Remove age prompts, deduct from birth date correctly 2022-08-16 11:08:13 +02:00
Denis Merigoux
4336fb0a41
Update assets 2022-08-15 18:38:15 +02:00
Denis Merigoux
d93e00c7bc
Some factorization 2022-08-15 18:33:09 +02:00
Denis Merigoux
93f6a19ea9
Update assets 2022-08-15 18:01:12 +02:00
Denis Merigoux
1fdb21326b
Fix logement meublé thing 2022-08-15 17:43:29 +02:00
Denis Merigoux
c278f61cf2
Update assets 2022-08-15 17:21:43 +02:00
Denis Merigoux
489d2f9506
Fixed bugs in allocation logement eligibility 2022-08-15 17:16:23 +02:00
Denis Merigoux
2ae0efa5dd
Fix subtle bug with the default false value for conditions 2022-08-15 16:47:36 +02:00
Denis Merigoux
1aeb47effd
Fix uncaught type error 2022-08-15 16:20:31 +02:00
Louis Gesbert
0b0e774d1c More factorisation, in particular for variables 2022-08-12 17:18:06 +02:00
Louis Gesbert
ebf97a0995 Pass-specific literals 2022-08-12 16:55:32 +02:00