From a651314bd9fcbe04e7d1274fcf7289e42d31df83 Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Mon, 29 Jan 2018 16:16:34 +0000 Subject: Look through let expressions when constructing nconstraints (needed for handling guards after atom-to-itself transformation in monomorphisation) --- src/type_check.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/type_check.ml b/src/type_check.ml index a49807ce..2b558421 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -1850,6 +1850,8 @@ let rec assert_constraint env (E_aux (exp_aux, _) as exp) = Some nc | E_lit (L_aux (L_true, _)) -> Some nc_true | E_lit (L_aux (L_false, _)) -> Some nc_false + | E_let (_,e) -> + assert_constraint env e (* TODO: beware of fresh type vars *) | E_app (op, [x; y]) when string_of_id op = "or_bool" -> option_binop nc_or (assert_constraint env x) (assert_constraint env y) | E_app (op, [x; y]) when string_of_id op = "and_bool" -> -- cgit v1.2.3