From fd3219a34e03722cede6acc4653bd8f4dd3f1fbb Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Tue, 27 Sep 2022 18:51:22 +0200 Subject: [PATCH] Catala driver: re-run the typer after dcalc compilation --- compiler/driver.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/driver.ml b/compiler/driver.ml index 9e9a1852..74aef934 100644 --- a/compiler/driver.ml +++ b/compiler/driver.ml @@ -191,7 +191,7 @@ let driver source_file (options : Cli.options) : int = Scopelang.Dependency.check_type_cycles prgm.program_ctx.ctx_structs prgm.program_ctx.ctx_enums in - let prgm = Scopelang.Ast.type_program prgm in + let _prgm = Scopelang.Ast.type_program prgm in Cli.debug_print "Translating to default calculus..."; let prgm = Scopelang.Scope_to_dcalc.translate_program prgm in let prgm = @@ -227,10 +227,10 @@ let driver source_file (options : Cli.options) : int = Format.fprintf fmt "%a\n" (Shared_ast.Expr.format prgm.decl_ctx) prgrm_dcalc_expr - | ( `Interpret | `Typecheck | `OCaml | `Python | `Scalc | `Lcalc - | `Proof | `Plugin _ ) as backend -> ( - Cli.debug_print "Typechecking..."; - let prgm = Shared_ast.Typing.program prgm in + | (`Interpret | `OCaml | `Python | `Scalc | `Lcalc | `Proof | `Plugin _) + as backend -> ( + Cli.debug_print "Typechecking again..."; + let prgm = Shared_ast.Typing.program prgm in (* Cli.debug_print (Format.asprintf "Typechecking results :@\n%a" (Print.typ prgm.decl_ctx) typ); *) match backend with