From bec34199361f1dfb8dc2b4b4753c796f945dced9 Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Fri, 18 Oct 2019 14:47:04 +0200 Subject: [PATCH] cleaning --- src/passes/2-simplify/pascaligo.ml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/passes/2-simplify/pascaligo.ml b/src/passes/2-simplify/pascaligo.ml index 591e61180..0e9ddaf7e 100644 --- a/src/passes/2-simplify/pascaligo.ml +++ b/src/passes/2-simplify/pascaligo.ml @@ -379,22 +379,12 @@ let rec simpl_expression (t:Raw.expr) : expr result = | ELogic l -> simpl_logic_expression l | EList l -> simpl_list_expression l | ESet s -> simpl_set_expression s - | ECond c -> (*fail @@ simple_error "TODO"*) - (* let (c , loc) = r_split c in - let%bind expr = simpl_expression c.test in - let%bind match_true = simpl_expression c.ifso in - let%bind match_false = simpl_expression c.ifnot in - return @@ e_matching expr ~loc (Match_bool {match_true; match_false}) *) - + | ECond c -> let (c , loc) = r_split c in let%bind expr = simpl_expression c.test in let%bind match_true = simpl_expression c.ifso in let%bind match_false = simpl_expression c.ifnot in - let%bind lst = ok @@ - [(Raw.PTrue Region.ghost, match_true); - (Raw.PFalse Region.ghost, match_false)] in - let%bind cases = simpl_cases lst in - return @@ e_matching ~loc expr cases + return @@ e_matching expr ~loc (Match_bool {match_true; match_false}) | ECase c -> ( let (c , loc) = r_split c in let%bind e = simpl_expression c.expr in