diff options
| author | Brian Campbell | 2018-01-29 16:16:34 +0000 |
|---|---|---|
| committer | Brian Campbell | 2018-01-29 16:55:45 +0000 |
| commit | a651314bd9fcbe04e7d1274fcf7289e42d31df83 (patch) | |
| tree | aa73d7daa36b9d04c5d68c3820e595f45fa5f48f /src | |
| parent | c89cc7e43d0f3f2a5106d193dfe8bf6525591e92 (diff) | |
Look through let expressions when constructing nconstraints
(needed for handling guards after atom-to-itself transformation
in monomorphisation)
Diffstat (limited to 'src')
| -rw-r--r-- | src/type_check.ml | 2 |
1 files changed, 2 insertions, 0 deletions
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" -> |
