From fef22f2f0f0f0e821b68f3f917e48c97a974a511 Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Thu, 27 Feb 2014 14:46:15 +0000 Subject: Fix error to constructor pattern matching --- src/lem_interp/interp.lem | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lem_interp/interp.lem b/src/lem_interp/interp.lem index 854ed202..c55439f4 100644 --- a/src/lem_interp/interp.lem +++ b/src/lem_interp/interp.lem @@ -509,9 +509,9 @@ let rec match_pattern (P_aux p _) value = else (false,[]) | P_typ typ pat -> match_pattern pat value (* Might like to destructure against the type to get information *) | P_id id -> (true, [(id,value)]) - | P_app id pats -> + | P_app (Id_aux id _) pats -> match value with - | V_ctor cid t (V_tuple vals) -> + | V_ctor (Id_aux cid _) t (V_tuple vals) -> if (id = cid && ((List.length pats) = (List.length vals))) then foldr2 (fun pat value (matched_p,bounds) -> -- cgit v1.2.3