From bb018b24f5acac6b1c62b00279a3e7cb894e1d3b Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 1 Jul 2010 18:39:58 -0700 Subject: Fox the clauses that actually satisfy box and mutable constraints; in all the confusion I had got those wrong. --- src/boot/me/type.ml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml index c0251d4a..1529355f 100644 --- a/src/boot/me/type.ml +++ b/src/boot/me/type.ml @@ -417,13 +417,11 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit = | (TYSPEC_box a', TYSPEC_box b') -> unify_tyvars ucx a' b'; !a - | (TYSPEC_box a', - TYSPEC_resolved (_, Ast.TY_box _)) -> - unify_tyvars ucx a' b; !b - - | (TYSPEC_resolved (_, Ast.TY_box _), - TYSPEC_box b') -> - unify_tyvars ucx a b'; !a + | (TYSPEC_box tv, + TYSPEC_resolved (params, Ast.TY_box ty)) + | (TYSPEC_resolved (params, Ast.TY_box ty), + TYSPEC_box tv) -> + unify_ty_parametric ucx ty params tv; !a | (_, TYSPEC_resolved (params, Ast.TY_box ty)) when ucx.box_ok -> @@ -446,13 +444,11 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit = | (TYSPEC_mutable a', TYSPEC_mutable b') -> unify_tyvars ucx a' b'; !a - | (TYSPEC_mutable a', - TYSPEC_resolved (_, Ast.TY_mutable _)) -> - unify_tyvars ucx a' b; !b - - | (TYSPEC_resolved (_, Ast.TY_mutable _), - TYSPEC_mutable b') -> - unify_tyvars ucx a b'; !a + | (TYSPEC_mutable tv, + TYSPEC_resolved (params, Ast.TY_mutable ty)) + | (TYSPEC_resolved (params, Ast.TY_mutable ty), + TYSPEC_mutable tv) -> + unify_ty_parametric ucx ty params tv; !a | (_, TYSPEC_resolved (params, Ast.TY_mutable ty)) when ucx.mut_ok -> -- cgit v1.2.3