Commit 9429c0a2 authored by John van Groningen's avatar John van Groningen

refactor, remove unused constructor KI_ConsVar, unused field tci_dcl_modules...

refactor, remove unused constructor KI_ConsVar, unused field tci_dcl_modules and unused argument dcl_modules
parent e2d3e30e
......@@ -42,13 +42,12 @@ from check_instances import ::SortedInstances
:: LocalTypePatternVariable
:: DictionaryTypes :== [(Index, [ExprInfoPtr])]
tryToSolveOverloading :: ![(Optional [TypeContext], [ExprInfoPtr], IdentPos, Index)] !Int !{# CommonDefs } !ClassInstanceInfo !*Coercions !*OverloadingState !{# DclModule}
tryToSolveOverloading :: ![(Optional [TypeContext], [ExprInfoPtr], IdentPos, Index)] !Int !{# CommonDefs } !ClassInstanceInfo !*Coercions !*OverloadingState
-> (![TypeContext], !*Coercions, ![LocalTypePatternVariable], DictionaryTypes, !*OverloadingState)
:: TypeCodeInfo =
{ tci_type_var_heap :: !.TypeVarHeap
, tci_attr_var_heap :: !.AttrVarHeap
, tci_dcl_modules :: !{# DclModule}
, tci_common_defs :: !{# CommonDefs }
}
......
......@@ -1231,9 +1231,9 @@ where
specialized_types_in_context_match _ _ type_var_heap
= (False,type_var_heap);
tryToSolveOverloading :: ![(Optional [TypeContext], [ExprInfoPtr], IdentPos, Index)] !Int !{# CommonDefs } !ClassInstanceInfo !*Coercions !*OverloadingState !{# DclModule}
tryToSolveOverloading :: ![(Optional [TypeContext], [ExprInfoPtr], IdentPos, Index)] !Int !{# CommonDefs } !ClassInstanceInfo !*Coercions !*OverloadingState
-> (![TypeContext], !*Coercions, ![LocalTypePatternVariable], DictionaryTypes, !*OverloadingState)
tryToSolveOverloading ocs main_dcl_module_n defs instance_info coercion_env os dcl_modules
tryToSolveOverloading ocs main_dcl_module_n defs instance_info coercion_env os
# (reduced_calls, contexts, coercion_env, type_pattern_vars, os) = foldSt (reduce_contexts_of_applications_in_function defs instance_info) ocs ([], [], coercion_env, [], os)
| os.os_error.ea_ok
# (contexts, os_var_heap) = foldSt add_specified_contexts ocs (contexts,os.os_var_heap)
......@@ -2037,7 +2037,7 @@ fatal function_name message
class toTypeCodeExpression type :: type !(!*TypeCodeInfo,!*VarHeap,!*ErrorAdmin) -> (!TypeCodeExpression, !(!*TypeCodeInfo,!*VarHeap,!*ErrorAdmin))
instance toTypeCodeExpression Type where
toTypeCodeExpression type=:(TA cons_id=:{type_index} type_args) (tci=:{tci_dcl_modules,tci_common_defs},var_heap,error)
toTypeCodeExpression type=:(TA cons_id=:{type_index} type_args) (tci=:{tci_common_defs},var_heap,error)
# type_heaps = {th_vars = tci.tci_type_var_heap, th_attrs = tci.tci_attr_var_heap}
# (expanded, type, type_heaps)
= tryToExpandTypeSyn tci_common_defs type cons_id type_args type_heaps
......
......@@ -1142,9 +1142,6 @@ IsNewTypeOrAbstractNewTypeCons cons_number :== cons_number <= ConsNumberNewType
:: KindInfo = KI_Var !KindInfoPtr
| KI_Arrow !KindInfo !KindInfo
| KI_Const
| KI_ConsVar
| KI_VarBind !KindInfoPtr
| KI_NormVar !Int
......
......@@ -3005,10 +3005,9 @@ where
(over_info, (subst, ts_expr_heap)) = collect_and_expand_overloaded_calls fun_reqs [] (subst, ts_expr_heap)
(contexts, coercion_env, local_pattern_variables, dict_types,
{os_type_heaps, os_var_heap, os_symbol_heap, os_generic_heap, os_predef_symbols, os_special_instances, os_error})
= tryToSolveOverloading over_info main_dcl_module_n ti_common_defs class_instances coercion_env
{ os_type_heaps = ts_type_heaps, os_var_heap = ts_var_heap, os_symbol_heap = ts_expr_heap, os_generic_heap = ts.ts_generic_heap,
os_predef_symbols = predef_symbols, os_error = ts_error, os_special_instances = special_instances } dcl_modules
//ts = {ts & ts_generic_heap = os_generic_heap}
= tryToSolveOverloading over_info main_dcl_module_n ti_common_defs class_instances coercion_env
{ os_type_heaps = ts_type_heaps, os_var_heap = ts_var_heap, os_symbol_heap = ts_expr_heap, os_generic_heap = ts.ts_generic_heap,
os_predef_symbols = predef_symbols, os_error = ts_error, os_special_instances = special_instances }
| not os_error.ea_ok
= (True, os_predef_symbols, os_special_instances, out, create_erroneous_function_types comp { ts & ts_type_heaps = os_type_heaps,
ts_error = { os_error & ea_ok = True }, ts_var_store = 0, ts_attr_store = FirstAttrVar, ts_cons_variables = [], ts_exis_variables = [],
......@@ -3035,7 +3034,7 @@ where
{ ts & ts_var_store = 0, ts_attr_store = FirstAttrVar, ts_cons_variables = [], ts_exis_variables = [], ts_error = { ts.ts_error & ea_ok = True }})
# ts_type_heaps = ts.ts_type_heaps
type_code_info = { tci_type_var_heap = ts_type_heaps.th_vars, tci_attr_var_heap = ts_type_heaps.th_attrs,
tci_dcl_modules = dcl_modules, tci_common_defs = ti_common_defs }
tci_common_defs = ti_common_defs }
(fun_defs, ts_fun_env, ts_expr_heap, {tci_type_var_heap,tci_attr_var_heap}, ts_var_heap, ts_error, os_predef_symbols)
= removeOverloadedFunctions comp local_pattern_variables (reverse rev_error_contexts) main_dcl_module_n ts.ts_fun_defs ts.ts_fun_env
ts.ts_expr_heap type_code_info ts.ts_var_heap ts.ts_error os_predef_symbols
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment