diff options
author | martijnv | 2001-05-10 08:24:10 +0000 |
---|---|---|
committer | martijnv | 2001-05-10 08:24:10 +0000 |
commit | 99101dfbff1e519834132a038a945257992af4d0 (patch) | |
tree | 300bdf76bae6bd6c08a617bdcaa864b72e6065e1 /frontend/overloading.icl | |
parent | compiler option added: -dynamics which instructs the compiler to generate (diff) |
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
Diffstat (limited to 'frontend/overloading.icl')
-rw-r--r-- | frontend/overloading.icl | 10 |
1 files changed, 5 insertions, 5 deletions
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 |