mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 00:15:39 +03:00
Fix Python compilation and runtime
This commit is contained in:
parent
67d1665afc
commit
fc242a5d1f
@ -319,13 +319,15 @@ let rec format_expression (ctx : decl_ctx) (fmt : Format.formatter) (e : expr) :
|
||||
| EApp ((EOp (Log (VarDef var_def_info, info)), _), [arg1])
|
||||
when Cli.globals.trace ->
|
||||
Format.fprintf fmt
|
||||
"log_variable_definition(%a,@ LogIO(io_input=%s,@ io_output=%b),@ %a)"
|
||||
"log_variable_definition(%a,@ LogIO(input_io=InputIO.%s,@ \
|
||||
output_io=%s),@ %a)"
|
||||
format_uid_list info
|
||||
(match var_def_info.log_io_input with
|
||||
| Runtime.NoInput -> "NoInput"
|
||||
| Runtime.OnlyInput -> "OnlyInput"
|
||||
| Runtime.Reentrant -> "Reentrant")
|
||||
var_def_info.log_io_output (format_expression ctx) arg1
|
||||
(if var_def_info.log_io_output then "True" else "False")
|
||||
(format_expression ctx) arg1
|
||||
| EApp ((EOp (Log (PosRecordIfTrueBool, _)), pos), [arg1])
|
||||
when Cli.globals.trace ->
|
||||
Format.fprintf fmt
|
||||
|
@ -36,4 +36,4 @@
|
||||
(action
|
||||
(chdir
|
||||
%{workspace_root}
|
||||
(run catala Python -O %{dep:aides_logement.catala_fr}))))
|
||||
(run catala Python -O -t %{dep:aides_logement.catala_fr}))))
|
||||
|
@ -431,7 +431,7 @@ def money_of_decimal(d: Decimal) -> Money:
|
||||
"""
|
||||
Warning: rounds to the nearest cent
|
||||
"""
|
||||
return Money(Integer(mpz(d.value)))
|
||||
return Money(Integer(mpz(d.value) * mpz(100)))
|
||||
|
||||
|
||||
# --------
|
||||
|
Loading…
Reference in New Issue
Block a user