mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
Added a last TODO and put big example under CI
This commit is contained in:
parent
b55d8c823b
commit
420348beda
@ -445,6 +445,11 @@ let rec hoist_closures_expr :
|
||||
| EAbs { tys; _ } ->
|
||||
(* this is the closure we want to hoist*)
|
||||
let closure_var = Var.make ("closure_" ^ name_context) in
|
||||
(* TODO: This will end up as a toplevel name. However for now we assume
|
||||
toplevel names are unique, but this breaks this assertions and can lead
|
||||
to name wrangling in the backends. We need to have a better system for
|
||||
name disambiguation when for instance printing to Dcalc/Lcalc/Scalc but
|
||||
also OCaml, Python, etc. *)
|
||||
( [
|
||||
{
|
||||
name = closure_var;
|
||||
|
@ -168,6 +168,13 @@ $ catala Interpret_Lcalc -s Exemple1 --avoid_exceptions
|
||||
[RESULT] éligibilité = ESome true
|
||||
```
|
||||
|
||||
```catala-test-inline
|
||||
$ catala Interpret_Lcalc -s Exemple1 --avoid_exceptions -O --closure_conversion
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] montant_versé = ESome 246.23 €
|
||||
[RESULT] éligibilité = ESome true
|
||||
```
|
||||
|
||||
```catala-test-inline
|
||||
$ catala Interpret -s Exemple2
|
||||
[RESULT] Computation successful! Results:
|
||||
@ -181,3 +188,10 @@ $ catala Interpret -s Exemple2 --avoid_exceptions
|
||||
[RESULT] montant_versé = 230.63 €
|
||||
[RESULT] éligibilité = true
|
||||
```
|
||||
|
||||
```catala-test-inline
|
||||
$ catala Interpret -s Exemple2 --avoid_exceptions -O --closure_conversion
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] montant_versé = 230.63 €
|
||||
[RESULT] éligibilité = true
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user