[m-rev.] diff: order items in .int files

Zoltan Somogyi zs at csse.unimelb.edu.au
Sun Oct 1 14:23:37 AEST 2006


compiler/modules.m:
	Order the items when they are written out to .int files, as well as
	when they are written out to .int2 files. This way, just changing the
	order of some items in the interface won't lead to the recompilation
	of dependent modules.

	Cleanup the way we use the standardize_impl_items predicate (which, it
	turns out, is not involved in the step noted in the above paragraph).
	
	Convert an error message to use our new facilities.

tests/invalid/*.err_exp:
	Update these expected outputs to conform t the change to modules.m.

Zoltan.

cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/libatomic_ops-1.2
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/doc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/tests
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing boehm_gc/windows-untested
cvs diff: Diffing boehm_gc/windows-untested/vc60
cvs diff: Diffing boehm_gc/windows-untested/vc70
cvs diff: Diffing boehm_gc/windows-untested/vc71
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.403
diff -u -r1.403 modules.m
--- compiler/modules.m	12 Sep 2006 04:41:40 -0000	1.403
+++ compiler/modules.m	1 Oct 2006 02:16:28 -0000
@@ -700,7 +700,7 @@
     % update_interface_return_succeeded(FileName, Succeeded):
     %
     % Call the shell script mercury_update_interface to update the
-    % interface file FileName if it has changed.
+    % interface file FileName from FileName.tmp if it has changed.
     %
 :- pred update_interface_return_succeeded(file_name::in, bool::out,
     io::di, io::uo) is det.
@@ -1408,6 +1408,7 @@
                 strip_unnecessary_impl_defns(!InterfaceItems),
                 check_for_clauses_in_interface(!InterfaceItems, !IO),
                 check_int_for_no_exports(!.InterfaceItems, ModuleName, !IO),
+                order_items(!InterfaceItems),
                 write_interface_file(SourceFileName, ModuleName, ".int",
                     MaybeTimestamp, !.InterfaceItems, !IO),
                 get_short_interface(!.InterfaceItems, int2,
@@ -1425,7 +1426,7 @@
 
     get_interface(ModuleName, no, Items0, InterfaceItems0),
     % Assertions are also stripped since they should only be written
-    % to .opt files,
+    % to .opt files.
     strip_assertions(InterfaceItems0, InterfaceItems1),
     check_for_clauses_in_interface(InterfaceItems1, InterfaceItems, !IO),
     get_short_interface(InterfaceItems, int3, ShortInterfaceItems0),
@@ -1538,24 +1539,9 @@
             Items = IntItems
         ;
             !.ImplItems = [_ | _],
-            standardize_impl_items(!.ImplItems, no, Unexpected,
-                [], RevRemainderItems, [], ImportItems, [], UseItems,
-                [], TypeDefnItems),
-            (
-                Unexpected = yes,
-                unexpected(this_file, "strip_unnecessary_impl_defns_2: " ++
-                    "unexpected items in implementation section")
-                % XXX If the above exception is thrown and you need a
-                % workaround you, can replace the exception with this code:
-                % Items = IntItems ++ [make_pseudo_decl(implementation)]
-                %    ++ !.ImplItems
-            ;
-                Unexpected = no,
-                list.reverse(RevRemainderItems, RemainderItems),
-                list.condense([IntItems, [make_pseudo_decl(md_implementation)],
-                    ImportItems, UseItems, TypeDefnItems, RemainderItems],
-                    Items)
-            )
+            standardize_impl_items(!.ImplItems, StdImplItems),
+            ImplSectionItem = make_pseudo_decl(md_implementation),
+            list.condense([IntItems, [ImplSectionItem], StdImplItems], Items)
         )
     ).
 
@@ -1569,7 +1555,25 @@
 :- inst type_defn_item  ==  bound(item_type_defn(ground, ground, ground,
                                 ground, ground)).
 
-:- pred standardize_impl_items(item_list::in, bool::in, bool::out,
+:- pred standardize_impl_items(item_list::in, item_list::out) is det.
+
+standardize_impl_items(Items0, Items) :-
+    do_standardize_impl_items(Items0, no, Unexpected, [], RevRemainderItems,
+        [], ImportItems, [], UseItems, [], TypeDefnItems),
+    (
+        Unexpected = yes,
+        unexpected(this_file, "standardize_impl_items: unexpected items")
+        % XXX If the above exception is thrown and you need a
+        % workaround you can replace the call to unexpected with this code:
+        % Items = Items0
+    ;
+        Unexpected = no,
+        list.reverse(RevRemainderItems, RemainderItems),
+        list.condense([ImportItems, UseItems, TypeDefnItems, RemainderItems],
+            Items)
+    ).
+
+:- pred do_standardize_impl_items(item_list::in, bool::in, bool::out,
     item_list::in, item_list::out,
     item_list::in(list_skel(item_context(import_item))),
     item_list::out(list_skel(item_context(import_item))),
@@ -1579,9 +1583,9 @@
     item_list::out(list_skel(item_context(type_defn_item))))
     is det.
 
-standardize_impl_items([], !Unexpected, !RevRemainderItems,
+do_standardize_impl_items([], !Unexpected, !RevRemainderItems,
         !ImportItems, !UseItems, !TypeDefnItems).
-standardize_impl_items([ItemAndContext | ItemAndContexts], !Unexpected,
+do_standardize_impl_items([ItemAndContext | ItemAndContexts], !Unexpected,
         !RevRemainderItems, !ImportItems, !UseItems, !TypeDefnItems) :-
     ItemAndContext = Item - Context,
     ( Item = item_module_defn(_VarSet, ModuleDefn) ->
@@ -1590,16 +1594,16 @@
             ( ImportModules = list_module([_ImportModule]) ->
                 insert_import_module(Context, Item, !ImportItems)
             ;
-                unexpected(this_file, "standardize_impl_items: " ++
-                    "non-singleton-module import")
+                unexpected(this_file,
+                    "do_standardize_impl_items: non-singleton-module import")
             )
         ;
             ModuleDefn = md_use(UseModules),
             ( UseModules = list_module([_UseModule]) ->
                 insert_use_module(Context, Item, !UseItems)
             ;
-                unexpected(this_file, "standardize_impl_items: " ++
-                    "non-singleton-module use")
+                unexpected(this_file,
+                    "do_standardize_impl_items: non-singleton-module use")
             )
         ;
             ( ModuleDefn = md_module(_)
@@ -1626,7 +1630,7 @@
     ;
         !:RevRemainderItems = [ItemAndContext | !.RevRemainderItems]
     ),
-    standardize_impl_items(ItemAndContexts, !Unexpected,
+    do_standardize_impl_items(ItemAndContexts, !Unexpected,
         !RevRemainderItems, !ImportItems, !UseItems, !TypeDefnItems).
 
 :- pred insert_import_module(prog_context::in, item::in,
@@ -1855,9 +1859,7 @@
 
 accumulate_abs_eqv_type_rhs(ImplTypeMap, TypeCtor, !AbsEqvRhsTypeCtors,
         !Modules) :-
-    (
-        map.search(ImplTypeMap, TypeCtor, TypeDefns)
-    ->
+    ( map.search(ImplTypeMap, TypeCtor, TypeDefns) ->
         list.foldl2(accumulate_abs_eqv_type_rhs_2(ImplTypeMap), TypeDefns,
             !AbsEqvRhsTypeCtors, !Modules)
     ;
@@ -1882,8 +1884,8 @@
         true
     ).
 
-:- pred accumulate_modules(type_ctor::in, set(module_name)::in,
-    set(module_name)::out) is det.
+:- pred accumulate_modules(type_ctor::in,
+    set(module_name)::in, set(module_name)::out) is det.
 
 accumulate_modules(TypeCtor, !Modules) :-
     % NOTE: This assumes that everything has been module qualified.
@@ -1897,8 +1899,8 @@
     % Given a type, return the set of user-defined type constructors
     % occurring in it.
     %
-:- pred type_to_type_ctor_set(mer_type::in, set(type_ctor)::in,
-    set(type_ctor)::out) is det.
+:- pred type_to_type_ctor_set(mer_type::in,
+    set(type_ctor)::in, set(type_ctor)::out) is det.
 
 type_to_type_ctor_set(Type, !TypeCtors) :-
     ( type_to_ctor_and_args(Type, TypeCtor, Args) ->
@@ -2135,35 +2137,27 @@
 :- pred warn_no_exports(module_name::in, io::di, io::uo) is det.
 
 warn_no_exports(ModuleName, !IO) :-
-    globals.io_lookup_bool_option(warn_nothing_exported, ExportWarning, !IO),
-    (
-        ExportWarning = yes,
-        module_name_to_file_name(ModuleName, ".m", no, FileName, !IO),
-        report_warning(context_init(FileName, 1), 0,
-            [words("Warning: interface for module"),
-            sym_name(ModuleName),
-            words("does not export anything.")], !IO),
-        globals.io_lookup_bool_option(verbose_errors, VerboseErrors, !IO),
-        (
-            VerboseErrors = yes,
-            report_warning(context_init(FileName, 1), 0,
-                [words("To be useful, a module should export"),
-                words("something. A file should contain"),
-                words("at least one declaration other than"),
-                fixed("`:- import_module'"),
-                words("in its interface section(s)."),
-                words("This would normally be a"),
-                fixed("`:- pred',"), fixed("`:- func',"),
-                fixed("`:- type',"), fixed("`:- inst'"),
-                fixed("or `:- mode'"),
-                fixed("declaration.")], !IO)
-        ;
-            VerboseErrors = no,
-            globals.io_set_extra_error_info(yes, !IO)
-        )
-    ;
-        ExportWarning = no
-    ).
+    module_name_to_file_name(ModuleName, ".m", no, FileName, !IO),
+    Context = context_init(FileName, 1),
+    Severity = severity_conditional(warn_nothing_exported, yes,
+        severity_warning, no),
+    Component = option_is_set(warn_nothing_exported, yes,
+        [always([words("Warning: interface for module"),
+            sym_name(ModuleName), words("does not export anything.")]),
+        verbose_only(
+            [words("To be useful, a module should export something."),
+            words("A file should contain at least one declaration"),
+            words("other than"), fixed("`:- import_module'"),
+            words("in its interface section(s)."),
+            words("This would normally be a"),
+            fixed("`:- pred',"), fixed("`:- func',"),
+            fixed("`:- type',"), fixed("`:- inst'"),
+            fixed("or `:- mode'"), words("declaration.")])
+        ]),
+    Msg = simple_msg(Context, [Component]),
+    Spec = error_spec(Severity, phase_term_to_parse_tree, [Msg]),
+    % XXX _NumErrors
+    write_error_spec(Spec, 0, _NumWarnings, 0, _NumErrors, !IO).
 
 %-----------------------------------------------------------------------------%
 
@@ -2173,7 +2167,7 @@
 write_interface_file(_SourceFileName, ModuleName, Suffix, MaybeTimestamp,
         InterfaceItems0, !IO) :-
 
-        % Create (e.g.) `foo.int.tmp'.
+    % Create (e.g.) `foo.int.tmp'.
     string.append(Suffix, ".tmp", TmpSuffix),
     module_name_to_file_name(ModuleName, Suffix, yes, OutputFileName, !IO),
     module_name_to_file_name(ModuleName, TmpSuffix, no, TmpOutputFileName,
@@ -2198,9 +2192,8 @@
             ( OldError = no_module_errors ->
                 MaybeOldItems = yes(OldItems)
             ;
-                % If we can't read in the old file, the
-                % timestamps will all be set to the
-                % modification time of the source file.
+                % If we can't read in the old file, the timestamps will
+                % all be set to the modification time of the source file.
                 MaybeOldItems = no
             ),
             recompilation.version.compute_version_numbers(Timestamp,
@@ -2231,8 +2224,6 @@
     globals.io_set_option(line_numbers, bool(LineNumbers), !IO),
     update_interface(OutputFileName, !IO).
 
-        % update <Module>.int from <Module>.int.tmp if necessary
-
 update_interface(OutputFileName, !IO) :-
     update_interface_return_succeeded(OutputFileName, Succeeded, !IO),
     (
@@ -7175,13 +7166,9 @@
                 IncludeImplTypes = yes,
                 include_in_int_file_implementation(Item)
             ->
-                (
-                    make_abstract_defn(Item, int2, ImpItem1)
-                ->
+                ( make_abstract_defn(Item, int2, ImpItem1) ->
                     ImpItem = ImpItem1
-                ;
-                    make_abstract_unify_compare(Item, int2, ImpItem1)
-                ->
+                ; make_abstract_unify_compare(Item, int2, ImpItem1) ->
                     ImpItem = ImpItem1
                 ;
                     ImpItem = Item
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing debian/patches
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
Index: tests/invalid/bigtest.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/bigtest.err_exp,v
retrieving revision 1.12
diff -u -r1.12 bigtest.err_exp
--- tests/invalid/bigtest.err_exp	7 Sep 2006 05:51:24 -0000	1.12
+++ tests/invalid/bigtest.err_exp	1 Oct 2006 01:44:19 -0000
@@ -4,7 +4,7 @@
 bigtest.m:016: Error: type parameters must be variables: t3 = t1 + t2.
 bigtest.m:001: Warning: interface for module `bigtest' does not export
 bigtest.m:001:   anything.
-bigtest.m:001: To be useful, a module should export something. A file should
+bigtest.m:001:   To be useful, a module should export something. A file should
 bigtest.m:001:   contain at least one declaration other than `:- import_module'
 bigtest.m:001:   in its interface section(s). This would normally be a
 bigtest.m:001:   `:- pred', `:- func', `:- type', `:- inst' or `:- mode'
Index: tests/invalid/duplicate_modes.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/duplicate_modes.err_exp,v
retrieving revision 1.10
diff -u -r1.10 duplicate_modes.err_exp
--- tests/invalid/duplicate_modes.err_exp	7 Sep 2006 05:51:26 -0000	1.10
+++ tests/invalid/duplicate_modes.err_exp	1 Oct 2006 01:44:28 -0000
@@ -1,6 +1,6 @@
 duplicate_modes.m:001: Warning: interface for module `duplicate_modes' does not
 duplicate_modes.m:001:   export anything.
-duplicate_modes.m:001: To be useful, a module should export something. A file
+duplicate_modes.m:001:   To be useful, a module should export something. A file
 duplicate_modes.m:001:   should contain at least one declaration other than
 duplicate_modes.m:001:   `:- import_module' in its interface section(s). This
 duplicate_modes.m:001:   would normally be a `:- pred', `:- func', `:- type',
Index: tests/invalid/errors2.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/errors2.err_exp,v
retrieving revision 1.17
diff -u -r1.17 errors2.err_exp
--- tests/invalid/errors2.err_exp	14 Sep 2006 06:01:15 -0000	1.17
+++ tests/invalid/errors2.err_exp	1 Oct 2006 01:44:30 -0000
@@ -1,6 +1,6 @@
 errors2.m:001: Warning: interface for module `errors2' does not export
 errors2.m:001:   anything.
-errors2.m:001: To be useful, a module should export something. A file should
+errors2.m:001:   To be useful, a module should export something. A file should
 errors2.m:001:   contain at least one declaration other than `:- import_module'
 errors2.m:001:   in its interface section(s). This would normally be a
 errors2.m:001:   `:- pred', `:- func', `:- type', `:- inst' or `:- mode'
Index: tests/invalid/no_exports.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/no_exports.err_exp,v
retrieving revision 1.5
diff -u -r1.5 no_exports.err_exp
--- tests/invalid/no_exports.err_exp	14 Jun 2006 08:14:54 -0000	1.5
+++ tests/invalid/no_exports.err_exp	1 Oct 2006 01:44:48 -0000
@@ -1,7 +1,7 @@
 no_exports.m:001: Warning: interface for module `no_exports' does not export
 no_exports.m:001:   anything.
-no_exports.m:001: To be useful, a module should export something. A file should
-no_exports.m:001:   contain at least one declaration other than
+no_exports.m:001:   To be useful, a module should export something. A file
+no_exports.m:001:   should contain at least one declaration other than
 no_exports.m:001:   `:- import_module' in its interface section(s). This would
 no_exports.m:001:   normally be a `:- pred', `:- func', `:- type', `:- inst'
 no_exports.m:001:   or `:- mode' declaration.
Index: tests/invalid/predmode.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/predmode.err_exp,v
retrieving revision 1.9
diff -u -r1.9 predmode.err_exp
--- tests/invalid/predmode.err_exp	14 Jun 2006 08:14:55 -0000	1.9
+++ tests/invalid/predmode.err_exp	1 Oct 2006 01:44:52 -0000
@@ -1,7 +1,7 @@
 predmode.m:005: Error: some but not all arguments have modes: p((int :: in), int).
 predmode.m:001: Warning: interface for module `predmode' does not export
 predmode.m:001:   anything.
-predmode.m:001: To be useful, a module should export something. A file should
+predmode.m:001:   To be useful, a module should export something. A file should
 predmode.m:001:   contain at least one declaration other than
 predmode.m:001:   `:- import_module' in its interface section(s). This would
 predmode.m:001:   normally be a `:- pred', `:- func', `:- type', `:- inst'
Index: tests/invalid/prog_io_erroneous.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/prog_io_erroneous.err_exp,v
retrieving revision 1.10
diff -u -r1.10 prog_io_erroneous.err_exp
--- tests/invalid/prog_io_erroneous.err_exp	7 Sep 2006 05:51:31 -0000	1.10
+++ tests/invalid/prog_io_erroneous.err_exp	1 Oct 2006 01:44:52 -0000
@@ -1,8 +1,8 @@
 prog_io_erroneous.m:001: Warning: interface for module `prog_io_erroneous' does
 prog_io_erroneous.m:001:   not export anything.
-prog_io_erroneous.m:001: To be useful, a module should export something. A file
-prog_io_erroneous.m:001:   should contain at least one declaration other than
-prog_io_erroneous.m:001:   `:- import_module' in its interface section(s). This
-prog_io_erroneous.m:001:   would normally be a `:- pred', `:- func', `:- type',
-prog_io_erroneous.m:001:   `:- inst' or `:- mode' declaration.
+prog_io_erroneous.m:001:   To be useful, a module should export something. A
+prog_io_erroneous.m:001:   file should contain at least one declaration other
+prog_io_erroneous.m:001:   than `:- import_module' in its interface section(s).
+prog_io_erroneous.m:001:   This would normally be a `:- pred', `:- func',
+prog_io_erroneous.m:001:   `:- type', `:- inst' or `:- mode' declaration.
 prog_io_erroneous.m:012: Error: no clauses for predicate `q'/2.
Index: tests/invalid/typeclass_missing_det_3.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/typeclass_missing_det_3.err_exp,v
retrieving revision 1.7
diff -u -r1.7 typeclass_missing_det_3.err_exp
--- tests/invalid/typeclass_missing_det_3.err_exp	14 Jun 2006 08:14:55 -0000	1.7
+++ tests/invalid/typeclass_missing_det_3.err_exp	1 Oct 2006 01:45:02 -0000
@@ -1,12 +1,12 @@
 typeclass_missing_det_3.m:001: Warning: interface for module
 typeclass_missing_det_3.m:001:   `typeclass_missing_det_3' does not export
 typeclass_missing_det_3.m:001:   anything.
-typeclass_missing_det_3.m:001: To be useful, a module should export something.
-typeclass_missing_det_3.m:001:   A file should contain at least one declaration
-typeclass_missing_det_3.m:001:   other than `:- import_module' in its interface
-typeclass_missing_det_3.m:001:   section(s). This would normally be a
-typeclass_missing_det_3.m:001:   `:- pred', `:- func', `:- type', `:- inst'
-typeclass_missing_det_3.m:001:   or `:- mode' declaration.
+typeclass_missing_det_3.m:001:   To be useful, a module should export
+typeclass_missing_det_3.m:001:   something. A file should contain at least one
+typeclass_missing_det_3.m:001:   declaration other than `:- import_module' in
+typeclass_missing_det_3.m:001:   its interface section(s). This would normally
+typeclass_missing_det_3.m:001:   be a `:- pred', `:- func', `:- type',
+typeclass_missing_det_3.m:001:   `:- inst' or `:- mode' declaration.
 typeclass_missing_det_3.m:013: Error: no determinism declaration for type class
 typeclass_missing_det_3.m:013:   method predicate
 typeclass_missing_det_3.m:013:   `typeclass_missing_det_3.write'/3.
Index: tests/invalid/typeclass_test_11.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/typeclass_test_11.err_exp,v
retrieving revision 1.3
diff -u -r1.3 typeclass_test_11.err_exp
--- tests/invalid/typeclass_test_11.err_exp	14 Jun 2006 08:14:55 -0000	1.3
+++ tests/invalid/typeclass_test_11.err_exp	1 Oct 2006 01:45:05 -0000
@@ -1,8 +1,8 @@
 typeclass_test_11.m:004: Error: constraints on class declarations may only constrain type variables and ground types: _1 =< blah(_2).
 typeclass_test_11.m:001: Warning: interface for module `typeclass_test_11' does
 typeclass_test_11.m:001:   not export anything.
-typeclass_test_11.m:001: To be useful, a module should export something. A file
-typeclass_test_11.m:001:   should contain at least one declaration other than
-typeclass_test_11.m:001:   `:- import_module' in its interface section(s). This
-typeclass_test_11.m:001:   would normally be a `:- pred', `:- func', `:- type',
-typeclass_test_11.m:001:   `:- inst' or `:- mode' declaration.
+typeclass_test_11.m:001:   To be useful, a module should export something. A
+typeclass_test_11.m:001:   file should contain at least one declaration other
+typeclass_test_11.m:001:   than `:- import_module' in its interface section(s).
+typeclass_test_11.m:001:   This would normally be a `:- pred', `:- func',
+typeclass_test_11.m:001:   `:- type', `:- inst' or `:- mode' declaration.
Index: tests/invalid/types.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/types.err_exp,v
retrieving revision 1.17
diff -u -r1.17 types.err_exp
--- tests/invalid/types.err_exp	12 Sep 2006 04:41:50 -0000	1.17
+++ tests/invalid/types.err_exp	1 Oct 2006 01:45:08 -0000
@@ -1,5 +1,5 @@
 types.m:001: Warning: interface for module `types' does not export anything.
-types.m:001: To be useful, a module should export something. A file should
+types.m:001:   To be useful, a module should export something. A file should
 types.m:001:   contain at least one declaration other than `:- import_module'
 types.m:001:   in its interface section(s). This would normally be a `:- pred',
 types.m:001:   `:- func', `:- type', `:- inst' or `:- mode' declaration.
Index: tests/invalid/undef_type.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/undef_type.err_exp,v
retrieving revision 1.10
diff -u -r1.10 undef_type.err_exp
--- tests/invalid/undef_type.err_exp	14 Jun 2006 08:14:56 -0000	1.10
+++ tests/invalid/undef_type.err_exp	1 Oct 2006 01:45:10 -0000
@@ -1,7 +1,7 @@
 undef_type.m:001: Warning: interface for module `undef_type' does not export
 undef_type.m:001:   anything.
-undef_type.m:001: To be useful, a module should export something. A file should
-undef_type.m:001:   contain at least one declaration other than
+undef_type.m:001:   To be useful, a module should export something. A file
+undef_type.m:001:   should contain at least one declaration other than
 undef_type.m:001:   `:- import_module' in its interface section(s). This would
 undef_type.m:001:   normally be a `:- pred', `:- func', `:- type', `:- inst'
 undef_type.m:001:   or `:- mode' declaration.
Index: tests/invalid/vars_in_wrong_places.err_exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/vars_in_wrong_places.err_exp,v
retrieving revision 1.7
diff -u -r1.7 vars_in_wrong_places.err_exp
--- tests/invalid/vars_in_wrong_places.err_exp	14 Jun 2006 08:14:57 -0000	1.7
+++ tests/invalid/vars_in_wrong_places.err_exp	1 Oct 2006 01:45:14 -0000
@@ -7,7 +7,7 @@
 vars_in_wrong_places.m:008: Error: atom expected in function `:- mode' declaration: _1 = int.
 vars_in_wrong_places.m:001: Warning: interface for module
 vars_in_wrong_places.m:001:   `vars_in_wrong_places' does not export anything.
-vars_in_wrong_places.m:001: To be useful, a module should export something. A
+vars_in_wrong_places.m:001:   To be useful, a module should export something. A
 vars_in_wrong_places.m:001:   file should contain at least one declaration
 vars_in_wrong_places.m:001:   other than `:- import_module' in its interface
 vars_in_wrong_places.m:001:   section(s). This would normally be a `:- pred',
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/par_conj
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/trailing
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list