diff: avoid spurious warning for sub-modules

Fergus Henderson fjh at cs.mu.OZ.AU
Sat May 30 22:19:58 AEST 1998


compiler/prog_io.m:
	Avoid spurious warning messages about source file
	`bar.m' containing module `foo:bar' -- this case
	is supported, and should not trigger a warning.

Index: compiler/prog_io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io.m,v
retrieving revision 1.172
diff -u -c -6 -r1.172 prog_io.m
/usr/local/bin/diff: conflicting specifications of output style
*** prog_io.m	1998/05/29 08:50:47	1.172
--- prog_io.m	1998/05/30 12:15:22
***************
*** 468,479 ****
--- 468,484 ----
  	    {
  		match_sym_name(StartModuleName, DefaultModuleName)
  	    ->
  		ModuleName = DefaultModuleName,
  		Messages0 = []
  	    ;
+ 		match_sym_name(DefaultModuleName, StartModuleName)
+ 	    ->
+ 		ModuleName = StartModuleName,
+ 		Messages0 = []
+ 	    ;
  	    	prog_out__sym_name_to_string(StartModuleName,
  			StartModuleNameString),
  	    	string__append_list(["source file `", SourceFileName,
  			"' contains module named `", StartModuleNameString,
  			"'"], WrongModuleWarning),
  	        maybe_add_warning(WarnWrong, MaybeFirstTerm, FirstContext,

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list