diff --git a/compiler/add_class.m b/compiler/add_class.m index 0479bcf0f..420ba04b6 100644 --- a/compiler/add_class.m +++ b/compiler/add_class.m @@ -50,6 +50,7 @@ :- import_module mdbcomp.prim_data. :- import_module mdbcomp.sym_name. :- import_module parse_tree.prog_data. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.prog_type. :- import_module parse_tree.prog_util. diff --git a/compiler/add_foreign_enum.m b/compiler/add_foreign_enum.m index e44f5f6fd..5faf40587 100644 --- a/compiler/add_foreign_enum.m +++ b/compiler/add_foreign_enum.m @@ -34,6 +34,7 @@ :- import_module parse_tree.error_spec. :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_type. :- import_module list. :- import_module map. diff --git a/compiler/add_mode.m b/compiler/add_mode.m index 8ef4915d3..386697d72 100644 --- a/compiler/add_mode.m +++ b/compiler/add_mode.m @@ -21,7 +21,7 @@ :- import_module hlds.status. :- import_module parse_tree. :- import_module parse_tree.error_spec. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. :- import_module list. diff --git a/compiler/add_mutable_aux_preds.m b/compiler/add_mutable_aux_preds.m index 00f7c94d3..c2fdf4e31 100644 --- a/compiler/add_mutable_aux_preds.m +++ b/compiler/add_mutable_aux_preds.m @@ -27,6 +27,7 @@ :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_foreign. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module cord. :- import_module list. diff --git a/compiler/add_pragma_decl.m b/compiler/add_pragma_decl.m index c543484bc..5ad7de9b5 100644 --- a/compiler/add_pragma_decl.m +++ b/compiler/add_pragma_decl.m @@ -19,7 +19,7 @@ :- import_module hlds.make_hlds.qual_info. :- import_module parse_tree. :- import_module parse_tree.error_spec. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module io. :- import_module list. @@ -88,6 +88,7 @@ :- import_module parse_tree.maybe_error. :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_data_pragma. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.prog_util. :- import_module transform_hlds. :- import_module transform_hlds.term_constr_main_types. diff --git a/compiler/add_pragma_gen.m b/compiler/add_pragma_gen.m index 1cd3fe29a..eca41e264 100644 --- a/compiler/add_pragma_gen.m +++ b/compiler/add_pragma_gen.m @@ -17,7 +17,7 @@ :- import_module hlds.hlds_module. :- import_module parse_tree. :- import_module parse_tree.error_spec. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module list. @@ -53,6 +53,7 @@ :- import_module parse_tree.maybe_error. :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_data_pragma. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module map. :- import_module maybe. diff --git a/compiler/add_pragma_impl.m b/compiler/add_pragma_impl.m index a950317e9..e6f5cee01 100644 --- a/compiler/add_pragma_impl.m +++ b/compiler/add_pragma_impl.m @@ -19,7 +19,7 @@ :- import_module hlds.make_hlds.qual_info. :- import_module parse_tree. :- import_module parse_tree.error_spec. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module io. :- import_module list. @@ -84,6 +84,8 @@ :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_data_pragma. :- import_module parse_tree.prog_foreign. +:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.prog_util. :- import_module bool. diff --git a/compiler/add_pragma_tabling.m b/compiler/add_pragma_tabling.m index 279cb8049..ef47356c6 100644 --- a/compiler/add_pragma_tabling.m +++ b/compiler/add_pragma_tabling.m @@ -14,7 +14,7 @@ :- import_module hlds.status. :- import_module parse_tree. :- import_module parse_tree.error_spec. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module io. :- import_module list. @@ -60,6 +60,8 @@ :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_data_pragma. +:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.prog_mode. :- import_module parse_tree.prog_util. diff --git a/compiler/add_pragma_type_spec.m b/compiler/add_pragma_type_spec.m index a6825ee8c..8fec50445 100644 --- a/compiler/add_pragma_type_spec.m +++ b/compiler/add_pragma_type_spec.m @@ -13,7 +13,7 @@ :- import_module hlds.make_hlds.qual_info. :- import_module parse_tree. :- import_module parse_tree.error_spec. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module list. @@ -49,6 +49,7 @@ :- import_module parse_tree.maybe_error. :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_data_pragma. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.prog_type_scan. :- import_module parse_tree.prog_type_subst. :- import_module parse_tree.prog_util. diff --git a/compiler/add_pragma_type_spec_constr.m b/compiler/add_pragma_type_spec_constr.m index 3d00d6cfd..4fc68e7e9 100644 --- a/compiler/add_pragma_type_spec_constr.m +++ b/compiler/add_pragma_type_spec_constr.m @@ -13,7 +13,7 @@ :- import_module hlds.make_hlds.qual_info. :- import_module parse_tree. :- import_module parse_tree.error_spec. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module io. :- import_module list. @@ -48,6 +48,7 @@ :- import_module parse_tree.parse_tree_out_type. :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_data_pragma. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.prog_type_scan. :- import_module parse_tree.prog_type_subst. :- import_module parse_tree.prog_type_test. diff --git a/compiler/add_pragma_util.m b/compiler/add_pragma_util.m index 75ce2c5e1..992437fc4 100644 --- a/compiler/add_pragma_util.m +++ b/compiler/add_pragma_util.m @@ -28,7 +28,7 @@ :- import_module parse_tree.error_spec. :- import_module parse_tree.maybe_error. :- import_module parse_tree.prog_data. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module list. :- import_module one_or_more. diff --git a/compiler/add_pred.m b/compiler/add_pred.m index 5ec333e1e..99e1fb916 100644 --- a/compiler/add_pred.m +++ b/compiler/add_pred.m @@ -111,6 +111,7 @@ :- import_module libs.options. :- import_module mdbcomp.builtin_modules. :- import_module parse_tree.builtin_lib_types. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.prog_mode. :- import_module parse_tree.prog_parse_tree. :- import_module parse_tree.prog_type. diff --git a/compiler/add_solver.m b/compiler/add_solver.m index bd4e130ed..44a981ac4 100644 --- a/compiler/add_solver.m +++ b/compiler/add_solver.m @@ -71,6 +71,7 @@ :- import_module mdbcomp.prim_data. :- import_module parse_tree.prog_data_foreign. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.prog_mode. :- import_module parse_tree.prog_type. diff --git a/compiler/add_type.m b/compiler/add_type.m index edf519a47..2a57f2bc0 100644 --- a/compiler/add_type.m +++ b/compiler/add_type.m @@ -25,7 +25,7 @@ :- import_module parse_tree. :- import_module parse_tree.error_spec. :- import_module parse_tree.prog_data. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_type. :- import_module list. diff --git a/compiler/build_eqv_maps.m b/compiler/build_eqv_maps.m index ba451e7f6..531736c84 100644 --- a/compiler/build_eqv_maps.m +++ b/compiler/build_eqv_maps.m @@ -55,6 +55,8 @@ :- import_module parse_tree.error_spec. :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_type. :- import_module recompilation. :- import_module recompilation.item_types. diff --git a/compiler/check_type_inst_mode_defns.m b/compiler/check_type_inst_mode_defns.m index 832020a2d..6e539ffbd 100644 --- a/compiler/check_type_inst_mode_defns.m +++ b/compiler/check_type_inst_mode_defns.m @@ -21,7 +21,8 @@ :- import_module parse_tree.error_spec. :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_foreign_enum. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_type. :- import_module list. diff --git a/compiler/comp_unit_interface.m b/compiler/comp_unit_interface.m index b9a5f8171..f17bc5a5b 100644 --- a/compiler/comp_unit_interface.m +++ b/compiler/comp_unit_interface.m @@ -161,6 +161,8 @@ :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_foreign. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_mutable. :- import_module parse_tree.prog_type. :- import_module parse_tree.prog_type_repn. diff --git a/compiler/convert_parse_tree.m b/compiler/convert_parse_tree.m index 5083c0868..3b2113a0e 100644 --- a/compiler/convert_parse_tree.m +++ b/compiler/convert_parse_tree.m @@ -168,6 +168,10 @@ :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_data_pragma. :- import_module parse_tree.prog_foreign. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_pragma. +:- import_module parse_tree.prog_item_pred_proc_id. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_util. :- import_module parse_tree.type_inst_mode_map. :- import_module recompilation. diff --git a/compiler/dead_proc_elim.m b/compiler/dead_proc_elim.m index c24fea52a..c86ae6605 100644 --- a/compiler/dead_proc_elim.m +++ b/compiler/dead_proc_elim.m @@ -202,7 +202,6 @@ :- import_module libs.options. :- import_module mdbcomp.builtin_modules. :- import_module parse_tree.prog_data_pragma. -:- import_module parse_tree.prog_item. % undesirable dependency :- import_module parse_tree.prog_parse_tree. % undesirable dependency :- import_module assoc_list. diff --git a/compiler/decide_type_repn.m b/compiler/decide_type_repn.m index 17027b678..c5dff7101 100644 --- a/compiler/decide_type_repn.m +++ b/compiler/decide_type_repn.m @@ -131,7 +131,7 @@ :- import_module mdbcomp. :- import_module mdbcomp.sym_name. :- import_module parse_tree.error_spec. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_parse_tree. :- import_module list. @@ -169,6 +169,7 @@ :- import_module parse_tree.equiv_type_parse_tree. :- import_module parse_tree.parse_tree_out_type_repn. :- import_module parse_tree.prog_data. +:- import_module parse_tree.prog_item. :- import_module parse_tree.prog_type. :- import_module parse_tree.prog_type_construct. :- import_module parse_tree.prog_type_subst. diff --git a/compiler/du_type_layout.m b/compiler/du_type_layout.m index 79144b62f..7b10db77e 100644 --- a/compiler/du_type_layout.m +++ b/compiler/du_type_layout.m @@ -125,7 +125,7 @@ :- import_module parse_tree.parse_tree_out_term. :- import_module parse_tree.parse_tree_out_type. :- import_module parse_tree.prog_data. -:- import_module parse_tree.prog_item. % undesirable dependency +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_parse_tree. % undesirable dependency :- import_module parse_tree.prog_type. :- import_module parse_tree.prog_type_test. diff --git a/compiler/equiv_type_parse_tree.m b/compiler/equiv_type_parse_tree.m index ad9889c1e..88ab45893 100644 --- a/compiler/equiv_type_parse_tree.m +++ b/compiler/equiv_type_parse_tree.m @@ -68,7 +68,7 @@ :- import_module parse_tree.error_spec. :- import_module parse_tree.prog_data_event. :- import_module parse_tree.prog_data_used_modules. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_parse_tree. :- import_module recompilation. :- import_module recompilation.record_uses. @@ -136,6 +136,8 @@ :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_data_pragma. +:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module parse_tree.prog_type. :- import_module parse_tree.prog_type_construct. :- import_module parse_tree.prog_type_test. diff --git a/compiler/get_dependencies.m b/compiler/get_dependencies.m index 302147700..37518ecbb 100644 --- a/compiler/get_dependencies.m +++ b/compiler/get_dependencies.m @@ -188,6 +188,8 @@ :- import_module parse_tree.maybe_error. :- import_module parse_tree.prog_data_pragma. :- import_module parse_tree.prog_foreign. +:- import_module parse_tree.prog_item_pragma. +:- import_module parse_tree.prog_item_type. :- import_module bool. :- import_module cord. diff --git a/compiler/hlds_module.m b/compiler/hlds_module.m index d3609e8f1..bc86dceb5 100644 --- a/compiler/hlds_module.m +++ b/compiler/hlds_module.m @@ -49,6 +49,8 @@ :- import_module parse_tree.prog_data_used_modules. :- import_module parse_tree.prog_foreign. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_parse_tree. :- import_module recompilation. :- import_module recompilation.record_uses. diff --git a/compiler/intermod.m b/compiler/intermod.m index a68a900e2..1cfaebac8 100644 --- a/compiler/intermod.m +++ b/compiler/intermod.m @@ -153,6 +153,10 @@ :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_pragma. +:- import_module parse_tree.prog_item_pred_proc_id. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_util. :- import_module parse_tree.var_db. :- import_module parse_tree.var_table. diff --git a/compiler/intermod_analysis.m b/compiler/intermod_analysis.m index 285a67ca8..3abb5e66a 100644 --- a/compiler/intermod_analysis.m +++ b/compiler/intermod_analysis.m @@ -66,7 +66,7 @@ :- import_module hlds.hlds_module. :- import_module hlds.hlds_pred. :- import_module parse_tree. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module parse_tree.prog_parse_tree. :- import_module set. @@ -157,6 +157,7 @@ :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_data_pragma. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.var_table. :- import_module transform_hlds.intermod_order_pred_info. :- import_module transform_hlds.term_constr_data. diff --git a/compiler/item_util.m b/compiler/item_util.m index d41bbc2d3..643e604d9 100644 --- a/compiler/item_util.m +++ b/compiler/item_util.m @@ -23,6 +23,9 @@ :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_pragma. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_parse_tree. :- import_module list. diff --git a/compiler/make_hlds_error.m b/compiler/make_hlds_error.m index 26d4cadb6..94503a3f1 100644 --- a/compiler/make_hlds_error.m +++ b/compiler/make_hlds_error.m @@ -29,7 +29,7 @@ :- import_module parse_tree. :- import_module parse_tree.error_spec. :- import_module parse_tree.prog_data. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module list. :- import_module maybe. diff --git a/compiler/make_hlds_passes.m b/compiler/make_hlds_passes.m index 5ee3e2bdb..7455eb363 100644 --- a/compiler/make_hlds_passes.m +++ b/compiler/make_hlds_passes.m @@ -94,7 +94,11 @@ :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_foreign. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_pragma. +:- import_module parse_tree.prog_item_pred_proc_id. :- import_module parse_tree.prog_item_stats. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_mode. :- import_module parse_tree.prog_type. :- import_module parse_tree.prog_type_construct. diff --git a/compiler/make_hlds_separate_items.m b/compiler/make_hlds_separate_items.m index c24b072ca..ecb1cb833 100644 --- a/compiler/make_hlds_separate_items.m +++ b/compiler/make_hlds_separate_items.m @@ -19,6 +19,9 @@ :- import_module parse_tree. :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_pragma. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_parse_tree. :- import_module list. diff --git a/compiler/mercury_compile_middle_passes.m b/compiler/mercury_compile_middle_passes.m index 0244d5ac0..b705d6c46 100644 --- a/compiler/mercury_compile_middle_passes.m +++ b/compiler/mercury_compile_middle_passes.m @@ -23,11 +23,13 @@ :- import_module libs.op_mode. :- import_module parse_tree. :- import_module parse_tree.error_util. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module io. :- import_module set. +%---------------------------------------------------------------------------% + :- pred middle_pass(io.text_output_stream::in, io.text_output_stream::in, op_mode_front_and_middle::in, module_info::in, module_info::out, dump_info::in, dump_info::out, diff --git a/compiler/module_qual.collect_mq_info.m b/compiler/module_qual.collect_mq_info.m index 0ffef14c7..1151643f7 100644 --- a/compiler/module_qual.collect_mq_info.m +++ b/compiler/module_qual.collect_mq_info.m @@ -50,6 +50,8 @@ :- import_module parse_tree.parse_sym_name. :- import_module parse_tree.prog_data. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_type. :- import_module bool. :- import_module list. diff --git a/compiler/module_qual.qual_errors.m b/compiler/module_qual.qual_errors.m index 223e1c594..af9b6cee4 100644 --- a/compiler/module_qual.qual_errors.m +++ b/compiler/module_qual.qual_errors.m @@ -20,7 +20,7 @@ :- import_module parse_tree.module_qual.id_set. :- import_module parse_tree.module_qual.mq_info. :- import_module parse_tree.prog_data. -:- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_pragma. :- import_module list. :- import_module maybe. diff --git a/compiler/module_qual.qualify_items.m b/compiler/module_qual.qualify_items.m index d39a44824..e07a8942d 100644 --- a/compiler/module_qual.qualify_items.m +++ b/compiler/module_qual.qualify_items.m @@ -92,6 +92,10 @@ :- import_module parse_tree.prog_data_foreign. :- import_module parse_tree.prog_data_pragma. :- import_module parse_tree.prog_item. +:- import_module parse_tree.prog_item_inst_mode. +:- import_module parse_tree.prog_item_pragma. +:- import_module parse_tree.prog_item_pred_proc_id. +:- import_module parse_tree.prog_item_type. :- import_module parse_tree.prog_type_test. :- import_module parse_tree.prog_util. :- import_module recompilation. diff --git a/compiler/notes/compiler_design.html b/compiler/notes/compiler_design.html index 208fda325..9876a87fd 100644 --- a/compiler/notes/compiler_design.html +++ b/compiler/notes/compiler_design.html @@ -379,7 +379,9 @@ but that is not part of the parse_tree.m package.)

The parse tree data structure definition is in prog_data.m, prog_data_event.m, prog_data_foreign.m, prog_data_pragma.m, -prog_data_used_modules.m, prog_item.m, prog_parse_tree.m and file_kind.m, +prog_data_used_modules.m, prog_item.m, prog_item_inst_mode.m, +prog_item_pragma.m, prog_item_pred_proc_id.m, prog_item_type.m, +prog_parse_tree.m and file_kind.m, while the code to create it is in the following modules.