mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-09 22:16:10 +03:00
Catala driver: re-run the typer after dcalc compilation
This commit is contained in:
parent
0dbc4c8c35
commit
fd3219a34e
@ -191,7 +191,7 @@ let driver source_file (options : Cli.options) : int =
|
|||||||
Scopelang.Dependency.check_type_cycles prgm.program_ctx.ctx_structs
|
Scopelang.Dependency.check_type_cycles prgm.program_ctx.ctx_structs
|
||||||
prgm.program_ctx.ctx_enums
|
prgm.program_ctx.ctx_enums
|
||||||
in
|
in
|
||||||
let prgm = Scopelang.Ast.type_program prgm in
|
let _prgm = Scopelang.Ast.type_program prgm in
|
||||||
Cli.debug_print "Translating to default calculus...";
|
Cli.debug_print "Translating to default calculus...";
|
||||||
let prgm = Scopelang.Scope_to_dcalc.translate_program prgm in
|
let prgm = Scopelang.Scope_to_dcalc.translate_program prgm in
|
||||||
let prgm =
|
let prgm =
|
||||||
@ -227,9 +227,9 @@ let driver source_file (options : Cli.options) : int =
|
|||||||
Format.fprintf fmt "%a\n"
|
Format.fprintf fmt "%a\n"
|
||||||
(Shared_ast.Expr.format prgm.decl_ctx)
|
(Shared_ast.Expr.format prgm.decl_ctx)
|
||||||
prgrm_dcalc_expr
|
prgrm_dcalc_expr
|
||||||
| ( `Interpret | `Typecheck | `OCaml | `Python | `Scalc | `Lcalc
|
| (`Interpret | `OCaml | `Python | `Scalc | `Lcalc | `Proof | `Plugin _)
|
||||||
| `Proof | `Plugin _ ) as backend -> (
|
as backend -> (
|
||||||
Cli.debug_print "Typechecking...";
|
Cli.debug_print "Typechecking again...";
|
||||||
let prgm = Shared_ast.Typing.program prgm in
|
let prgm = Shared_ast.Typing.program prgm in
|
||||||
(* Cli.debug_print (Format.asprintf "Typechecking results :@\n%a"
|
(* Cli.debug_print (Format.asprintf "Typechecking results :@\n%a"
|
||||||
(Print.typ prgm.decl_ctx) typ); *)
|
(Print.typ prgm.decl_ctx) typ); *)
|
||||||
|
Loading…
Reference in New Issue
Block a user