[m-rev.] diff: fix problem with nightly builds

Julien Fischer juliensf at csse.unimelb.edu.au
Fri Jun 8 00:05:40 AEST 2012


Branches: main

Fix a problem that was preventing the ROTD from building.  The recent change to
generate errors for abstract equivalence types that occur in type class
instances means that we now generate an error for the pred_id/0 type.
(It is an instance of the dependency_node/1 type class.)

compiler/hlds_pred.m:
 	Put a notag wrapper around the body of the pred_id/0 type so
 	that we can use it in type class instance without complaint.

Julien.

Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.280
diff -u -r1.280 hlds_pred.m
--- compiler/hlds_pred.m	5 Jun 2012 18:19:31 -0000	1.280
+++ compiler/hlds_pred.m	7 Jun 2012 13:20:47 -0000
@@ -875,35 +875,38 @@
      pred_attributes::out) is det.

  %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%

  :- implementation.

-:- type pred_id     ==  int.
+:- type pred_id
+    --->    pred_id(int).
+
  :- type proc_id     ==  int.

-shroud_pred_id(PredId) = shrouded_pred_id(PredId).
+shroud_pred_id(pred_id(PredId)) = shrouded_pred_id(PredId).
  shroud_proc_id(ProcId) = shrouded_proc_id(ProcId).
-shroud_pred_proc_id(proc(PredId, ProcId)) =
+shroud_pred_proc_id(proc(pred_id(PredId), ProcId)) =
      shrouded_pred_proc_id(PredId, ProcId).

-unshroud_pred_id(shrouded_pred_id(PredId)) = PredId.
+unshroud_pred_id(shrouded_pred_id(PredId)) = pred_id(PredId).
  unshroud_proc_id(shrouded_proc_id(ProcId)) = ProcId.
  unshroud_pred_proc_id(shrouded_pred_proc_id(PredId, ProcId)) =
-    proc(PredId, ProcId).
+    proc(pred_id(PredId), ProcId).

-pred_id_to_int(PredId, PredId).
-pred_id_to_int(PredId) = PredId.
+pred_id_to_int(pred_id(PredId), PredId).
+pred_id_to_int(pred_id(PredId)) = PredId.

  proc_id_to_int(ProcId, ProcId).
  proc_id_to_int(ProcId) = ProcId.

-initial_pred_id = 0.
+initial_pred_id = pred_id(0).
  initial_proc_id = 0.

-invalid_pred_id = -1.
+invalid_pred_id = pred_id(-1).
  invalid_proc_id = -1.

-next_pred_id(PredId, NextPredId) :-
+next_pred_id(pred_id(PredId), pred_id(NextPredId)) :-
      NextPredId = PredId + 1.

  in_in_unification_proc_id(0).
--------------------------------------------------------------------------
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