From c1ca3184af2a62bc5265d2371aec53998d60f1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sun, 29 Sep 2019 18:28:19 -0400 Subject: [PATCH] WIP: fixing the build errors --- src/passes/4-typer/typer.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/passes/4-typer/typer.ml b/src/passes/4-typer/typer.ml index 3020d17b6..d32263ba8 100644 --- a/src/passes/4-typer/typer.ml +++ b/src/passes/4-typer/typer.ml @@ -222,6 +222,7 @@ end open Errors let swap (a,b) = ok (b,a) +(* let rec type_program (p:I.program) : O.program result = let aux (e, acc:(environment * O.declaration Location.wrap list)) (d:I.declaration Location.wrap) = let%bind ed' = (bind_map_location (type_declaration e)) d in @@ -235,11 +236,12 @@ let rec type_program (p:I.program) : O.program result = trace (fun () -> program_error p ()) @@ bind_fold_list aux (Environment.full_empty, []) p in ok @@ List.rev lst +*) (* Extract pairs of (name,type) in the declaration and add it to the environment *) -and type_declaration env state : I.declaration -> (environment * Solver.state * O.declaration option) result = function +let rec type_declaration env state : I.declaration -> (environment * Solver.state * O.declaration option) result = function | Declaration_type (type_name , type_expression) -> let%bind tv = evaluate_type env type_expression in let env' = Environment.add_type type_name tv env in @@ -409,7 +411,7 @@ and type_expression : environment -> Solver.state -> I.expression -> (O.annotate ] in error ~data title content in trace main_error @@ - match ae.expression' with + match ae.expression with (* TODO: this file should take care only of the order in which program fragments are translated by Wrap.xyz