From 02e4b62028411bc107ba63eff87b8d996baae695 Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Tue, 30 Sep 2014 16:52:38 +0100 Subject: Add type annotations to funcls to track effects and constraints from one function-clause --- src/lem_interp/instruction_extractor.lem | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lem_interp/instruction_extractor.lem') diff --git a/src/lem_interp/instruction_extractor.lem b/src/lem_interp/instruction_extractor.lem index 52361911..74e5fd4c 100644 --- a/src/lem_interp/instruction_extractor.lem +++ b/src/lem_interp/instruction_extractor.lem @@ -38,11 +38,9 @@ end let rec extract_effects_of_pat id execute = match execute with | [] -> [] - | FCL_aux (FCL_Funcl _ (P_aux (P_app (Id_aux (Id i) _) _) _) exp) _ :: executes -> + | FCL_aux (FCL_Funcl _ (P_aux (P_app (Id_aux (Id i) _) _) _) _) (_,(Just(_,_,_,Effect_aux(Effect_set efs) _))) :: executes -> if i = id - then match exp with - | E_aux e (_,Just(_,_,_,Effect_aux (Effect_set efs) _)) -> efs - | _ -> [] end + then efs else extract_effects_of_pat id executes | _::executes -> extract_effects_of_pat id executes end -- cgit v1.2.3