From a9c5ebc1c1c0943f48c31831f95dd4d1d61b8dc3 Mon Sep 17 00:00:00 2001 From: Jon French Date: Mon, 23 Apr 2018 16:01:40 +0100 Subject: fix refactored rewrite_pexp_with_guards (where type information is and is not...) --- src/rewrites.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rewrites.ml b/src/rewrites.ml index 1ab2a9e0..591bc276 100644 --- a/src/rewrites.ml +++ b/src/rewrites.ml @@ -2786,13 +2786,13 @@ let rewrite_pexp_with_guards rewrite_pat (Pat_aux (pexp_aux, (annot: tannot anno | [] -> pexp | gs -> let unchecked_pexp = mk_pexp (Pat_when (strip_pat pat, List.map strip_exp gs |> fold_guards, strip_exp exp)) in - check_case (env_of_annot annot) (pat_typ_of pat) unchecked_pexp (typ_of_annot annot) + check_case (pat_env_of pat) (pat_typ_of pat) unchecked_pexp (typ_of exp) end | Pat_when (pat, guard, exp) -> begin let pat = fold_pat { id_pat_alg with p_aux = rewrite_pat guards } pat in let unchecked_pexp = mk_pexp (Pat_when (strip_pat pat, List.map strip_exp !guards |> fold_guards, strip_exp exp)) in - check_case (env_of_annot annot) (pat_typ_of pat) unchecked_pexp (typ_of_annot annot) + check_case (pat_env_of pat) (pat_typ_of pat) unchecked_pexp (typ_of exp) end -- cgit v1.2.3