diff options
| author | Brian Campbell | 2018-01-09 11:33:04 +0000 |
|---|---|---|
| committer | Brian Campbell | 2018-01-09 11:33:04 +0000 |
| commit | 35bfe5b1c08fb045283785c819bf0ec4fe24f1c0 (patch) | |
| tree | 2030b072f93ae86395685771fb2ca4566d672e30 /src | |
| parent | f73d601390a42a07a575db0c5efd5982471c2f2d (diff) | |
Move reordering in alpha_equivalent before relabelling to give
consistent names
Diffstat (limited to 'src')
| -rw-r--r-- | src/type_check.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type_check.ml b/src/type_check.ml index dee17fee..a4b4bb39 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -1613,11 +1613,11 @@ let rec alpha_equivalent env typ1 typ2 = | Typ_fn (typ1, typ2, eff) -> Typ_fn (relabel typ1, relabel typ2, eff) | Typ_tup typs -> Typ_tup (List.map relabel typs) | Typ_exist (kids, nc, typ) -> + let (kids, _) = kid_order (KidSet.of_list kids) typ in let kids = List.map (fun kid -> (kid, new_kid ())) kids in let nc = List.fold_left (fun nc (kid, nk) -> nc_subst_nexp kid (Nexp_var nk) nc) nc kids in let typ = List.fold_left (fun nc (kid, nk) -> typ_subst_nexp kid (Nexp_var nk) nc) typ kids in let kids = List.map snd kids in - let (kids, _) = kid_order (KidSet.of_list kids) typ in Typ_exist (kids, nc, typ) | Typ_app (id, args) -> Typ_app (id, List.map relabel_arg args) |
