diff options
author | johnvg | 2011-04-14 12:53:59 +0000 |
---|---|---|
committer | johnvg | 2011-04-14 12:53:59 +0000 |
commit | 60c9b01a4b2c6c1f3dc56cd8edbc90118f751511 (patch) | |
tree | f0fd64fc71795c8412f2116c7d59fd3e61df7d8d /frontend/comparedefimp.icl | |
parent | commit more changes for: (diff) |
replace field dcl_macro_conversions by dcl_has_macro_conversions of type DclModule
(to have fewer differences with the haskell frontend branch),
the conversion table for macros is not used after checking
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1919 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/comparedefimp.icl')
-rw-r--r-- | frontend/comparedefimp.icl | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/frontend/comparedefimp.icl b/frontend/comparedefimp.icl index 17f32a7..b1d835f 100644 --- a/frontend/comparedefimp.icl +++ b/frontend/comparedefimp.icl @@ -1,6 +1,6 @@ implementation module comparedefimp -import syntax, checksupport, compare_constructor, utilities, StdCompare, compilerSwitches +import syntax, checksupport, compare_constructor, utilities, StdCompare :: CompareState = { comp_type_var_heap :: !.TypeVarHeap @@ -121,7 +121,7 @@ where # dcl_class_def = dcl_class_defs.[class_index] (icl_class_def, icl_class_defs) = icl_class_defs![class_index] # (ok, icl_member_defs, comp_st) = compare_classes dcl_class_def dcl_member_defs icl_class_def icl_member_defs comp_st - | ok // ---> ("compare_class_defs", dcl_class_def.class_ident, icl_class_def.class_ident) + | ok = (icl_class_defs, icl_member_defs, comp_st) # comp_error = compareError class_def_error (newPosition icl_class_def.class_ident icl_class_def.class_pos) comp_st.comp_error = (icl_class_defs, icl_member_defs, { comp_st & comp_error = comp_error }) @@ -168,8 +168,6 @@ where = (icl_instance_defs, comp_st) # comp_error = compareError instance_def_error (newPosition icl_instance_def.ins_ident icl_instance_def.ins_pos) comp_st.comp_error = (icl_instance_defs, { comp_st & comp_error = comp_error }) -// ---> ("compare_instance_defs", dcl_instance_def.ins_ident, dcl_instance_def.ins_type, icl_instance_def.ins_ident, icl_instance_def.ins_type) - compareGenericDefs :: !{# Int} !{#Bool} !{# GenericDef} !u:{# GenericDef} !*CompareState -> (!u:{# GenericDef}, !*CompareState) compareGenericDefs dcl_sizes copied_from_dcl dcl_generic_defs icl_generic_defs comp_st @@ -333,7 +331,6 @@ where comp_st = { comp_st & comp_type_var_heap = comp_type_var_heap, comp_attr_var_heap = comp_attr_var_heap } = compare (dcl_st.st_args, (dcl_st.st_args_strictness, (dcl_st.st_result, (dcl_st.st_context, dcl_st.st_attr_env)))) (icl_st.st_args, (icl_st.st_args_strictness, (icl_st.st_result, (icl_st.st_context, icl_st.st_attr_env)))) comp_st -// ---> ("compare SymbolType", dcl_st, icl_st) instance compare InstanceType where @@ -342,7 +339,6 @@ where comp_attr_var_heap = initialyseAttributeVars dcl_it.it_attr_vars icl_it.it_attr_vars comp_attr_var_heap comp_st = { comp_st & comp_type_var_heap = comp_type_var_heap, comp_attr_var_heap = comp_attr_var_heap } = compare (dcl_it.it_types, dcl_it.it_context) (icl_it.it_types, icl_it.it_context) comp_st -// ---> ("compare InstanceType", dcl_it, icl_it) instance compare TypeContext where @@ -423,9 +419,9 @@ CEC_ContextNotOK :== -3 CEC_AttrEnvNotOK :== -4 class t_corresponds a :: !a !a -> *TypesCorrespondMonad + // whether two types correspond class e_corresponds a :: !a !a -> ExpressionsCorrespondMonad // check for correspondence of expressions - // whether two types correspond class getIdentPos a :: a -> IdentPos @@ -435,11 +431,11 @@ class CorrespondenceNumber a where initial_hwn hwn_heap = { hwn_heap = hwn_heap, hwn_number = 0 } -compareDefImp :: !Int !DclModule !Int !*IclModule !*{#*{#FunDef}} !*Heaps !*ErrorAdmin - -> (!.IclModule,!.{#.{#FunDef}},!.Heaps,!.ErrorAdmin) -compareDefImp main_dcl_module_n main_dcl_module=:{dcl_macro_conversions=No} n_exported_global_functions icl_module macro_defs heaps error_admin +compareDefImp :: !Int !DclModule !(Optional {#Index}) !Int !*IclModule !*{#*{#FunDef}} !*Heaps !*ErrorAdmin + -> (!.IclModule,!.{#.{#FunDef}},!.Heaps,!.ErrorAdmin) +compareDefImp main_dcl_module_n main_dcl_module No n_exported_global_functions icl_module macro_defs heaps error_admin = (icl_module, macro_defs,heaps, error_admin) -compareDefImp main_dcl_module_n main_dcl_module=:{dcl_macro_conversions=Yes macro_conversion_table} n_exported_global_functions icl_module macro_defs heaps error_admin +compareDefImp main_dcl_module_n main_dcl_module (Yes macro_conversion_table) n_exported_global_functions icl_module macro_defs heaps error_admin // | Trace_array icl_module.icl_functions // && Trace_array macro_defs.[main_dcl_module_n] |