diff options
| author | Alasdair | 2020-08-06 17:25:24 +0100 |
|---|---|---|
| committer | Alasdair | 2020-08-06 17:25:24 +0100 |
| commit | 6acc35376c9765d361359ebbfc473870b70d6e68 (patch) | |
| tree | 9f7d527a4a4ee1748afa20b53004b6e1be229297 | |
| parent | be32e9e3d3e70ddea1ecfc41dafbc054060b7b78 (diff) | |
Fix for last commit
| -rw-r--r-- | src/type_check.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/type_check.ml b/src/type_check.ml index 2ae7836f..1d6566ef 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -4925,7 +4925,7 @@ let check_letdef orig_env (LB_aux (letbind, (l, _))) = let tpat, env = bind_pat_no_guard orig_env (strip_pat pat) typ_annot in if (BESet.is_empty (effect_set (effect_of checked_bind)) || !opt_no_effects) then - [DEF_val (LB_aux (LB_val (tpat, checked_bind), (l, None)))], Env.add_toplevel_lets l (pat_ids tpat) env + [DEF_val (LB_aux (LB_val (tpat, checked_bind), (l, None)))], Env.add_toplevel_lets (pat_ids tpat) env else typ_error env l ("Top-level definition with effects " ^ string_of_effect (effect_of checked_bind)) | LB_val (pat, bind) -> check_duplicate_letbinding l pat orig_env; @@ -4933,7 +4933,7 @@ let check_letdef orig_env (LB_aux (letbind, (l, _))) = let tpat, env = bind_pat_no_guard orig_env (strip_pat pat) (typ_of inferred_bind) in if (BESet.is_empty (effect_set (effect_of inferred_bind)) || !opt_no_effects) then - [DEF_val (LB_aux (LB_val (tpat, inferred_bind), (l, None)))], Env.add_toplevel_lets l (pat_ids tpat) env + [DEF_val (LB_aux (LB_val (tpat, inferred_bind), (l, None)))], Env.add_toplevel_lets (pat_ids tpat) env else typ_error env l ("Top-level definition with effects " ^ string_of_effect (effect_of inferred_bind)) end |
