diff: hlds_out.m: empty goal paths

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jun 16 23:14:12 AEST 1998


compiler/hlds_out.m:
	Don't print out "goal path:" if the goal path is empty.

Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.194
diff -u -r1.194 hlds_out.m
--- hlds_out.m	1998/06/09 02:12:55	1.194
+++ hlds_out.m	1998/06/16 13:11:56
@@ -703,11 +703,15 @@
 	),
 	( { string__contains_char(Verbose, 'P') } ->
 		{ goal_info_get_goal_path(GoalInfo, Path) },
-		{ trace__path_to_string(Path, PathStr) },
-		hlds_out__write_indent(Indent),
-		io__write_string("% goal path: "),
-		io__write_string(PathStr),
-		io__write_string("\n")
+		( { Path \= [] } ->
+			{ trace__path_to_string(Path, PathStr) },
+			hlds_out__write_indent(Indent),
+			io__write_string("% goal path: "),
+			io__write_string(PathStr),
+			io__write_string("\n")
+		;
+			[]
+		)
 	;
 		[]
 	),

-- 
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