From 0fa3d1efb1d2547f8b55857962db228d6063cd45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Fri, 10 Sep 2010 17:24:02 +0200 Subject: [PATCH] Fixed problem in Typing --- compiler/heptagon/analysis/typing.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/heptagon/analysis/typing.ml b/compiler/heptagon/analysis/typing.ml index 2416e37..90488e7 100644 --- a/compiler/heptagon/analysis/typing.ml +++ b/compiler/heptagon/analysis/typing.ml @@ -277,7 +277,7 @@ let build_subst names values = QualEnv.empty names values let rec subst_type_vars m = function - | Tarray(ty, e) -> Tarray(subst_type_vars m ty, static_exp_subst m e) + | Tarray(ty, e) -> Tarray(subst_type_vars m ty, simplify m e) | Tprod l -> Tprod (List.map (subst_type_vars m) l) | t -> t @@ -561,8 +561,8 @@ let rec typing const_env h e = List.map (fun { p_name = n } -> local_qn n) ty_desc.node_params in let m = build_subst node_params params in let expected_ty_list = - List.map (simplify m) expected_ty_list in - let result_ty_list = List.map (simplify m) result_ty_list in + List.map (subst_type_vars m) expected_ty_list in + let result_ty_list = List.map (subst_type_vars m) result_ty_list in let typed_n = expect_static_exp const_env (Tid Initial.pint) n in let ty, typed_e_list = typing_iterator const_env h it n expected_ty_list result_ty_list e_list in