From 99101dfbff1e519834132a038a945257992af4d0 Mon Sep 17 00:00:00 2001 From: martijnv Date: Thu, 10 May 2001 08:24:10 +0000 Subject: bug fixes: - unused dynamics in where/let clauses do not cause a rule doesn't match error in overloading.icl instead they are ignored - default behaviour changed e.g. f (i :: Int, j :: Int) = abort "Int" f (r :: Real, s :: Real) = abort "Real" f _ = abort "stop" The compiler first matched on the tuple and then did the dynamic pattern matches. But the last match did not call the last (default) alternative if it did not match. - some small changes git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@421 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 4ef4143..f77afab 100644 --- a/frontend/overloading.icl +++ b/frontend/overloading.icl @@ -1410,7 +1410,7 @@ where adjustClassExpression symb_name l=:(TypeCodeExpression type_code_expression) ui # (expr,uni_vars,ui) = convertTypecode type_code_expression [] ui - | not (isEmpty uni_vars) + | False //not (isEmpty uni_vars) # (let_binds,ui) = createVariables uni_vars ui (let_info_ptr,ui) = let_ptr ui = ( Let { let_strict_binds = [] @@ -1425,12 +1425,12 @@ where convertTypecode TCE_Empty uni_vars ui = (EE,uni_vars,ui) // should not match -// convertTypecode (TCE_Var var_info_ptr) uni_vars ui -// = (Var {var_name = a_ij_var_name, var_info_ptr = var_info_ptr, var_expr_ptr = nilPtr},[var_info_ptr:uni_vars],ui) + convertTypecode (TCE_Var var_info_ptr) uni_vars ui + = (Var {var_name = a_ij_var_name, var_info_ptr = var_info_ptr, var_expr_ptr = nilPtr},[var_info_ptr:uni_vars],ui) convertTypecode (TCE_TypeTerm var_info_ptr) uni_vars ui // # v_tc_name = { id_name = "overloadingvTC", id_info = nilPtr } -// = (Var {var_name = v_tc_name, var_info_ptr = var_info_ptr, var_expr_ptr = nilPtr},uni_vars,ui) - = (Var {var_name = v_tc_name, var_info_ptr = var_info_ptr, var_expr_ptr = nilPtr},[var_info_ptr:uni_vars],ui) + = (Var {var_name = v_tc_name, var_info_ptr = var_info_ptr, var_expr_ptr = nilPtr},uni_vars,ui) +// WAS = (Var {var_name = v_tc_name, var_info_ptr = var_info_ptr, var_expr_ptr = nilPtr},[var_info_ptr:uni_vars],ui) convertTypecode (TCE_Constructor index typecode_exprs) uni_vars ui # (typecons_symb,ui) = getSymbol PD_TypeConsSymbol SK_Constructor 2 ui -- cgit v1.2.3