From db310e27adeafafd5ba19a009508375615e253f9 Mon Sep 17 00:00:00 2001 From: ronny Date: Tue, 16 Sep 2003 17:09:02 +0000 Subject: removed boolean result from substituteType and substitute: they could only fail in case of a kind error which is already detected elsewhere git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1376 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/overloading.icl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'frontend/overloading.icl') diff --git a/frontend/overloading.icl b/frontend/overloading.icl index 7f8655d..f97f44c 100644 --- a/frontend/overloading.icl +++ b/frontend/overloading.icl @@ -388,7 +388,7 @@ where where fresh_context :: !TypeContext !*(.a,*TypeHeaps) -> (TypeContext,(.a,*TypeHeaps)) fresh_context tc=:{tc_types} (var_heap, type_heaps) - # (_, tc_types, type_heaps) = substitute tc_types type_heaps + # (tc_types, type_heaps) = substitute tc_types type_heaps // (tc_var, var_heap) = newPtr VI_Empty var_heap // = ({ tc & tc_types = tc_types, tc_var = tc_var }, (var_heap, type_heaps)) = ({ tc & tc_types = tc_types }, (var_heap, type_heaps)) @@ -496,7 +496,7 @@ where is_predefined_symbol glob_module glob_object PD_UnboxedArrayType predef_symbols -> (unboxable, No, (predef_symbols, type_heaps)) SynType {at_type} - # (_, expanded_type, type_heaps) = substituteType td_attribute TA_Multi td_args type_args at_type type_heaps + # (expanded_type, type_heaps) = substituteType td_attribute TA_Multi td_args type_args at_type type_heaps -> try_to_unbox expanded_type defs (predef_symbols, type_heaps) _ -> (False, No, (predef_symbols, type_heaps)) @@ -593,7 +593,7 @@ tryToExpandTypeSyn defs type cons_id=:{type_ident,type_index={glob_object,glob_m # {td_ident,td_rhs,td_args,td_attribute} = defs.[glob_module].com_type_defs.[glob_object] = case td_rhs of SynType {at_type} - # (_, expanded_type, type_heaps) = substituteType td_attribute TA_Multi td_args type_args at_type type_heaps + # (expanded_type, type_heaps) = substituteType td_attribute TA_Multi td_args type_args at_type type_heaps -> (True, expanded_type, type_heaps) _ -> (False, type, type_heaps) @@ -835,7 +835,7 @@ where = type_var_heap <:= (tv_info_ptr, TVI_Type type) subst_context_and_generate_super_classes class_context (super_classes, type_heaps) - # (_, super_class, type_heaps) = substitute class_context type_heaps + # (super_class, type_heaps) = substitute class_context type_heaps | containsContext super_class super_classes = (super_classes, type_heaps) = generate_super_classes super_class ([super_class : super_classes], type_heaps) @@ -1057,7 +1057,7 @@ where # {tc_class=TCClass {glob_object={ds_index},glob_module}} = tc2 {class_args,class_members,class_context,class_dictionary} = defs.[glob_module].com_class_defs.[ds_index] th_vars = foldr2 (\{tv_info_ptr} type -> writePtr tv_info_ptr (TVI_Type type)) th_vars class_args tc2.tc_types - (_, super_instances, type_heaps) = substitute class_context { type_heaps & th_vars = th_vars } + (super_instances, type_heaps) = substitute class_context { type_heaps & th_vars = th_vars } = find_super_instance tc1 super_instances (size class_members) address glob_module class_dictionary.ds_index defs type_heaps where find_super_instance :: !TypeContext ![TypeContext] !Index ![(Int, Global DefinedSymbol)] !Index !Index !{#CommonDefs} !*TypeHeaps -- cgit v1.2.3