[m-rev.] diff/for review: fix library compilation error in non-C grades
Julien Fischer
juliensf at cs.mu.OZ.AU
Thu Dec 16 14:51:02 AEDT 2004
Estimated hours taken: 0.2
Branches: main
Fix some compilation errors for the library in the non-C grades.
library/robdd.m:
Comment out the memoing pragmas until we have an
option to ignore them in unsupported grades. Those
affected can uncomment them in their workspaces for
the moment.
library/rtti_implementation.m:
s/get_functor_2/get_functor_with_names/ since that is
how it is referred to in the calls from construct.
library/type_desc.m:
Import std_util since semidet_fail is now used in this
module.
Cheers,
Julien.
Index: robdd.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/robdd.m,v
retrieving revision 1.2
diff -u -r1.2 robdd.m
--- robdd.m 15 Dec 2004 06:57:41 -0000 1.2
+++ robdd.m 16 Dec 2004 03:41:36 -0000
@@ -349,6 +349,9 @@
% :- import_module unsafe.
+% XXX The memo pragmas below should be uncommented when we have a
+% way of turning off tabling in grades that don't support it.
+
:- type robdd(T) ---> robdd(int).
% :- type robdd(T) ---> robdd(c_pointer).
@@ -493,7 +496,7 @@
(int) V);
").
-:- pragma memo(vars_entailed/1).
+%:- pragma memo(vars_entailed/1).
vars_entailed(R) =
( R = one ->
@@ -511,7 +514,7 @@
)
).
-:- pragma memo(vars_disentailed/1).
+%:- pragma memo(vars_disentailed/1).
vars_disentailed(R) =
( R = one ->
@@ -530,7 +533,7 @@
)
).
-:- pragma memo(definite_vars/3).
+%:- pragma memo(definite_vars/3).
definite_vars(R, T, F) :-
( R = one ->
@@ -563,7 +566,7 @@
:- func equivalent_vars_2(robdd(T)) =
entailment_result(leader_to_eqvclass(T)).
-:- pragma memo(equivalent_vars_2/1).
+%:- pragma memo(equivalent_vars_2/1).
equivalent_vars_2(R) = EQ :-
( R = one ->
@@ -636,7 +639,7 @@
:- type imp_res_2(T) ---> imps(map(var(T), vars_entailed_result(T))).
:- func implications_2(robdd(T)) = implication_result(T).
-:- pragma memo(implications_2/1).
+%:- pragma memo(implications_2/1).
implications_2(R) = implication_result(Imps, RevImps, DisImps, RevDisImps) :-
( R = one ->
@@ -844,7 +847,7 @@
%------------------------------------------------------------------------%
-:- pragma memo(dnf/1).
+%:- pragma memo(dnf/1).
dnf(R) =
( R = zero ->
@@ -942,7 +945,7 @@
(MR_ROBDD_node *) F);
").
-:- pragma memo(rename_vars/2).
+%:- pragma memo(rename_vars/2).
rename_vars(Subst, F) =
( is_terminal(F) ->
@@ -1026,7 +1029,7 @@
), list__reverse(to_sorted_list(Vars)),
OneOf0, R, NoneOf0, _).
-:- pragma memo(var_restrict_true/2).
+%:- pragma memo(var_restrict_true/2).
var_restrict_true(V, F0) = F :-
( is_terminal(F0) ->
@@ -1047,7 +1050,7 @@
)
).
-:- pragma memo(var_restrict_false/2).
+%:- pragma memo(var_restrict_false/2).
var_restrict_false(V, F0) = F :-
( is_terminal(F0) ->
Index: rtti_implementation.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/rtti_implementation.m,v
retrieving revision 1.55
diff -u -r1.55 rtti_implementation.m
--- rtti_implementation.m 14 Dec 2004 01:07:20 -0000 1.55
+++ rtti_implementation.m 16 Dec 2004 03:19:07 -0000
@@ -85,8 +85,9 @@
:- pred get_functor(type_desc__type_desc::in, int::in, string::out, int::out,
list(type_desc__type_desc)::out) is semidet.
-:- pred get_functor_2(type_desc__type_desc::in, int::in, string::out, int::out,
- list(type_desc__type_desc)::out, list(string)::out) is semidet.
+:- pred get_functor_with_names(type_desc__type_desc::in, int::in, string::out,
+ int::out, list(type_desc__type_desc)::out, list(string)::out)
+ is semidet.
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
@@ -316,8 +317,8 @@
get_functor_impl(TypeDesc, FunctorNumber, FunctorName, Arity,
TypeInfoList, _Names).
-get_functor_2(TypeDesc, FunctorNumber, FunctorName, Arity, TypeInfoList,
- Names) :-
+get_functor_with_names(TypeDesc, FunctorNumber, FunctorName, Arity,
+ TypeInfoList, Names) :-
get_functor_impl(TypeDesc, FunctorNumber, FunctorName, Arity,
TypeInfoList, Names).
Index: type_desc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/type_desc.m,v
retrieving revision 1.28
diff -u -r1.28 type_desc.m
--- type_desc.m 14 Dec 2004 01:07:21 -0000 1.28
+++ type_desc.m 16 Dec 2004 03:45:50 -0000
@@ -210,6 +210,7 @@
:- import_module bool, string, require.
:- use_module rtti_implementation.
+:- use_module std_util.
:- pragma foreign_decl("C", "
#include ""mercury_heap.h"" /* for MR_incr_hp_msg() etc. */
@@ -334,7 +335,7 @@
is_univ_pseudo_type_desc(_PseudoTypeDesc, -1) :-
% The backends in which we use this definition of this predicate
% don't yet support pseudo_type_descs.
- semidet_fail.
+ std_util.semidet_fail.
:- pred is_exist_pseudo_type_desc(pseudo_type_desc::in, int::out) is semidet.
@@ -358,7 +359,7 @@
is_exist_pseudo_type_desc(_PseudoTypeDesc, -1) :-
% The backends in which we use this definition of this predicate
% don't yet support pseudo_type_descs.
- semidet_fail.
+ std_util.semidet_fail.
:- pragma foreign_proc("C",
type_desc_to_pseudo_type_desc(TypeDesc::in) = (PseudoTypeDesc::out),
--------------------------------------------------------------------------
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