From 4c2529b83c8f06e5db702e70eb7111db564d41fa Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Mon, 24 Feb 2020 17:29:45 +0100 Subject: [PATCH] allow constructor without parameters --- src/passes/2-simplify/pascaligo.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/passes/2-simplify/pascaligo.ml b/src/passes/2-simplify/pascaligo.ml index a7ce6ea0e..370e36e93 100644 --- a/src/passes/2-simplify/pascaligo.ml +++ b/src/passes/2-simplify/pascaligo.ml @@ -367,7 +367,8 @@ let rec simpl_expression (t:Raw.expr) : expr result = | EConstr (ConstrApp c) -> ( let ((c, args) , loc) = r_split c in match args with - None -> simpl_tuple_expression [] + None -> + return @@ e_constructor ~loc c.value (e_unit ()) | Some args -> let args, args_loc = r_split args in let%bind arg =