[m-rev.] diff: fix compilation of mdbcomp and compiler

Julien Fischer juliensf at cs.mu.OZ.AU
Mon Aug 29 18:42:40 AEST 2005


Estimated hours taken: 0.1
Branches: main

compiler/add_special_pred.m:
compiler/post_term_analysis.m:
compiler/special_pred.m:
compiler/term_constr_initial.m:
compiler/trace_params.m:
compiler/unify_proc.m:
mdbcomp/prim_data.m:
	Workaround syntax errors that are caused by the addition of
	`:- initialise' declarations.  In the long run we should
	just change the special_pred_id type.

Julien.

Index: compiler/add_special_pred.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/add_special_pred.m,v
retrieving revision 1.1
diff -u -r1.1 add_special_pred.m
--- compiler/add_special_pred.m	26 Jul 2005 01:56:21 -0000	1.1
+++ compiler/add_special_pred.m	29 Aug 2005 08:02:40 -0000
@@ -217,7 +217,7 @@
                 true
             )
         ;
-            SpecialPredId = initialise,
+            SpecialPredId = (initialise),
             ( type_is_solver_type(!.ModuleInfo, Type) ->
                 do_add_special_pred_for_real(SpecialPredId, TVarSet, Type,
                     TypeCtor, TypeBody, Context, Status0, !ModuleInfo)
@@ -333,7 +333,7 @@
     module_info_name(!.ModuleInfo, ModuleName),
     special_pred_interface(SpecialPredId, Type, ArgTypes, ArgModes, Det),
     Name = special_pred_name(SpecialPredId, TypeCtor),
-    ( SpecialPredId = initialise ->
+    ( SpecialPredId = (initialise) ->
         TypeCtor = TypeSymName - _TypeArity,
         sym_name_get_module_name(TypeSymName, ModuleName, TypeModuleName),
         PredName = qualified(TypeModuleName, Name)
Index: compiler/post_term_analysis.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/post_term_analysis.m,v
retrieving revision 1.3
diff -u -r1.3 post_term_analysis.m
--- compiler/post_term_analysis.m	28 Apr 2005 07:56:56 -0000	1.3
+++ compiler/post_term_analysis.m	29 Aug 2005 08:14:57 -0000
@@ -189,7 +189,7 @@
 	(
 		% Always check solver type initialisation
 		% predicates since they are always user-defined.
-		SpecialPredId = initialise
+		SpecialPredId = (initialise)
 	;
 		get_user_unify_compare(ModuleInfo, TypeBody,
 			UnifyCompare),
@@ -239,7 +239,7 @@
 		SpecialPred = compare,
 		SpecialPredStr = "comparison"
 	;
-		SpecialPred = initialise,
+		SpecialPred = (initialise),
 		SpecialPredStr = "initialisation"
 	;
 		SpecialPred = index,
Index: compiler/special_pred.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/special_pred.m,v
retrieving revision 1.51
diff -u -r1.51 special_pred.m
--- compiler/special_pred.m	22 Mar 2005 06:40:25 -0000	1.51
+++ compiler/special_pred.m	29 Aug 2005 08:01:42 -0000
@@ -248,13 +248,13 @@
 		type_body_has_user_defined_equality_pred(ModuleInfo, Body,
 			unify_compare(_, UserCmp)), UserCmp = yes(_)
 	;
-		SpecialPredId \= initialise,
+		SpecialPredId \= (initialise),
 		Ctors = Body ^ du_type_ctors,
 		list__member(Ctor, Ctors),
 		Ctor = ctor(ExistQTVars, _, _, _),
 		ExistQTVars \= []
 	;
-		SpecialPredId = initialise,
+		SpecialPredId = (initialise),
 		type_body_is_solver_type(ModuleInfo, Body)
 	).

Index: compiler/term_constr_initial.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/term_constr_initial.m,v
retrieving revision 1.2
diff -u -r1.2 term_constr_initial.m
--- compiler/term_constr_initial.m	13 Jul 2005 11:41:46 -0000	1.2
+++ compiler/term_constr_initial.m	29 Aug 2005 08:15:31 -0000
@@ -414,7 +414,7 @@
     % predicates.  Leaving it up to the analyser may result in better
     % argument size information anyway.
     %
-    ( SpecialPredId \= initialise ->
+    ( SpecialPredId \= (initialise) ->
         ProcInfo0 = !.ProcTable ^ det_elem(ProcId),
         proc_info_headvars(ProcInfo0, HeadVars),
         proc_info_vartypes(ProcInfo0, VarTypes),
Index: compiler/termination.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/termination.m,v
retrieving revision 1.51
diff -u -r1.51 termination.m
--- compiler/termination.m	7 Apr 2005 06:32:16 -0000	1.51
+++ compiler/termination.m	29 Aug 2005 08:13:58 -0000
@@ -574,7 +574,7 @@
 	module_info_pred_info(ModuleInfo, PredId, PredInfo),
 	pred_info_get_origin(PredInfo, PredOrigin),
 	PredOrigin = special_pred(SpecialPredId - _),
-	SpecialPredId = initialise.
+	SpecialPredId = (initialise).

 %----------------------------------------------------------------------------%

@@ -719,7 +719,7 @@
 	% predicates.  Leaving it up to the analyser may result in better
 	% argument size information anyway.
 	%
-	( SpecialPredId \= initialise ->
+	( SpecialPredId \= (initialise) ->
 		map__lookup(!.ProcTable, ProcId, ProcInfo0),
 		proc_info_headvars(ProcInfo0, HeadVars),
 		special_pred_id_to_termination(SpecialPredId, HeadVars,
@@ -752,7 +752,7 @@
 	term_util__make_bool_list(HeadVars, [no, no], OutList),
 	ArgSize = finite(0, OutList),
 	Termination = cannot_loop(unit).
-special_pred_id_to_termination(initialise, _, _, _) :-
+special_pred_id_to_termination((initialise), _, _, _) :-
 	unexpected(this_file, "special_pred_id_to_termination/4 " ++
 		"initialise predicate").

Index: compiler/trace_params.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/trace_params.m,v
retrieving revision 1.23
diff -u -r1.23 trace_params.m
--- compiler/trace_params.m	22 Mar 2005 06:40:29 -0000	1.23
+++ compiler/trace_params.m	29 Aug 2005 08:03:26 -0000
@@ -177,7 +177,7 @@
 				SpecialPred = index,
 				EffTraceLevel = none
 			;
-				SpecialPred = initialise,
+				SpecialPred = (initialise),
 				EffTraceLevel = TraceLevel
 			)
 		;
Index: compiler/unify_proc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/unify_proc.m,v
retrieving revision 1.148
diff -u -r1.148 unify_proc.m
--- compiler/unify_proc.m	15 Aug 2005 07:18:31 -0000	1.148
+++ compiler/unify_proc.m	29 Aug 2005 08:05:24 -0000
@@ -644,7 +644,7 @@
     ; SpecialPredId = compare, Args = [Res, X, Y] ->
         unify_proc__generate_compare_clauses(ModuleInfo, Type,
             TypeBody, Res, X, Y, Context, Clauses, Info1, Info)
-    ; SpecialPredId = initialise, Args = [X] ->
+    ; SpecialPredId = (initialise), Args = [X] ->
         unify_proc__generate_initialise_clauses(ModuleInfo, Type,
             TypeBody, X, Context, Clauses, Info1, Info)

Index: mdbcomp/prim_data.m
===================================================================
RCS file: /home/mercury1/repository/mercury/mdbcomp/prim_data.m,v
retrieving revision 1.5
diff -u -r1.5 prim_data.m
--- mdbcomp/prim_data.m	14 Jun 2005 08:15:05 -0000	1.5
+++ mdbcomp/prim_data.m	29 Aug 2005 07:54:59 -0000
@@ -100,7 +100,7 @@
 	--->	unify
 	;	index
 	;	compare
-	;	initialise.
+	;	(initialise).

 	% special_pred_name_arity(SpecialPredType, GenericPredName, Arity):
 	%	true iff there is a special predicate of category

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list