From 3562ff88d2c65d018b473fc2fb07359f95e6b2f9 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Wed, 1 Dec 2021 18:04:08 +0100 Subject: Merge the ADTs, tuples and assumed types in the type and value definitions --- src/Substitute.ml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/Substitute.ml') diff --git a/src/Substitute.ml b/src/Substitute.ml index 635795ac..78109913 100644 --- a/src/Substitute.ml +++ b/src/Substitute.ml @@ -18,15 +18,12 @@ let rec ty_substitute (rsubst : 'r1 -> 'r2) match ty with | Adt (def_id, regions, tys) -> Adt (def_id, List.map rsubst regions, List.map subst tys) - | Tuple tys -> Tuple (List.map subst tys) | Array aty -> Array (subst aty) | Slice sty -> Slice (subst sty) | Ref (r, ref_ty, ref_kind) -> Ref (rsubst r, subst ref_ty, ref_kind) - | Assumed (aty, regions, tys) -> - Assumed (aty, List.map rsubst regions, List.map subst tys) - (* Below variants: we technically return the same value, but because - one has type ['r1 ty] and the other has type ['r2 ty] we need to - deconstruct then reconstruct *) + (* Below variants: we technically return the same value, but because + one has type ['r1 ty] and the other has type ['r2 ty], we need to + deconstruct then reconstruct *) | Bool -> Bool | Char -> Char | Never -> Never -- cgit v1.2.3