aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend/overloading.icl8
1 files changed, 5 insertions, 3 deletions
diff --git a/frontend/overloading.icl b/frontend/overloading.icl
index b94f3d2..6e5fd9a 100644
--- a/frontend/overloading.icl
+++ b/frontend/overloading.icl
@@ -256,7 +256,7 @@ where
= reduce_contexts_in_constraints info tc_types class_args class_context rs_state
| case tc_types of [_] -> False; _ -> True
- || case class_context of [] -> True; [_] -> True; _ -> False
+ || case class_context of [] -> True; [_] -> True; _ -> False
// not implemented for multiparameter type classes or fewer than 2 class constraints
= ({ rcs_class_context = { rc_class_index = {gi_module=glob_module,gi_index=ds_index}, rc_inst_module = NoIndex, rc_inst_members = {}, rc_types = tc_types, rc_red_contexts = [] },
rcs_constraints_contexts = constraints }, rs_state)
@@ -1355,10 +1355,12 @@ where
# {ui_instance_calls, ui_local_vars, ui_symbol_heap, ui_var_heap, ui_fun_defs, ui_fun_env, ui_has_type_codes, ui_error, ui_x = {x_type_code_info = type_code_info, x_predef_symbols = predef_symbols}}
= ui
- # (tb_args, var_heap) = foldSt retrieve_class_argument rev_variables (tb_args, ui_var_heap)
+ # (tb_args, var_heap) = foldSt retrieve_class_argument rev_variables (tb_args, ui_var_heap)
fun_def & fun_body = TransformedBody {tb_args = tb_args, tb_rhs = tb_rhs}, fun_arity = length tb_args,
fun_info = {fun_info & fi_calls = fun_info.fi_calls ++ ui_instance_calls, fi_local_vars = ui_local_vars,
- fi_properties = fun_info.fi_properties bitor FI_HasTypeCodes}
+ fi_properties = if ui_has_type_codes
+ (fun_info.fi_properties bitor FI_HasTypeCodes)
+ fun_info.fi_properties}
#! ok = ui_error.ea_ok
= (ok, { ui_fun_defs & [fun_index] = fun_def }, ui_fun_env, ui_symbol_heap, type_code_info, var_heap, ui_error, predef_symbols)
= (False, fun_defs, fun_env, symbol_heap, type_code_info, var_heap, error, predef_symbols)