diff: leading zero in stage numbers

Fergus Henderson fjh at cs.mu.oz.au
Fri Jul 18 16:21:04 AEST 1997


Estimated hours taken: 0.25

compiler/mercury_compile.m:
	Print out a leading zero before single-digit stage numbers,
	so that the stage numbers appear in numerical order when you
	do an `ls'.

Index: mercury_compile.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/mercury_compile.m,v
retrieving revision 1.47
diff -u -r1.47 mercury_compile.m
--- mercury_compile.m	1997/07/17 04:35:23	1.47
+++ mercury_compile.m	1997/07/18 04:26:37
@@ -278,7 +278,7 @@
 	{ bool__or(UndefTypes1, UndefTypes2, UndefTypes) },
 	{ bool__or(UndefModes0, UndefModes2, UndefModes) },
 
-	mercury_compile__maybe_dump_hlds(HLDS0, "1", "initial"), !,
+	mercury_compile__maybe_dump_hlds(HLDS0, "01", "initial"), !,
 
 	% Only stop on syntax errors in .opt files.
 	( { FoundError = yes ; IntermodError = yes } ->
@@ -396,7 +396,7 @@
 	    ;
 		maybe_write_string(Verbose, "% Program is type-correct.\n")
 	    ),
-	    mercury_compile__maybe_dump_hlds(HLDS3, "3", "typecheck"),
+	    mercury_compile__maybe_dump_hlds(HLDS3, "03", "typecheck"),
 
 	    %
 	    % Now continue, even if we got a type error,
@@ -512,7 +512,7 @@
 
 	mercury_compile__modecheck(HLDS4, Verbose, Stats, HLDS5,
 		FoundModeError, UnsafeToContinue),
-	mercury_compile__maybe_dump_hlds(HLDS5, "5", "modecheck"),
+	mercury_compile__maybe_dump_hlds(HLDS5, "05", "modecheck"),
 
 	( { UnsafeToContinue = yes } ->
 		{ FoundError = yes },
@@ -520,19 +520,21 @@
 	;
 		mercury_compile__detect_switches(HLDS5, Verbose, Stats, HLDS6),
 		!,
-		mercury_compile__maybe_dump_hlds(HLDS6, "6", "switch_detect"),
+		mercury_compile__maybe_dump_hlds(HLDS6, "06", "switch_detect"),
 		!,
 
 		mercury_compile__detect_cse(HLDS6, Verbose, Stats, HLDS7), !,
-		mercury_compile__maybe_dump_hlds(HLDS7, "7", "cse"), !,
+		mercury_compile__maybe_dump_hlds(HLDS7, "07", "cse"), !,
 
 		mercury_compile__check_determinism(HLDS7, Verbose, Stats, HLDS8,
 			FoundDetError), !,
-		mercury_compile__maybe_dump_hlds(HLDS8, "8", "determinism"), !,
+		mercury_compile__maybe_dump_hlds(HLDS8, "08", "determinism"),
+		!,
 
 		mercury_compile__check_unique_modes(HLDS8, Verbose, Stats,
 			HLDS9, FoundUniqError), !,
-		mercury_compile__maybe_dump_hlds(HLDS9, "9", "unique_modes"), !,
+		mercury_compile__maybe_dump_hlds(HLDS9, "09", "unique_modes"),
+		!,
 		
 		mercury_compile__check_stratification(HLDS9, Verbose, Stats, 
 			HLDS10, FoundStratError), !,

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