[m-rev.] diff: fix duplicate pragma type_specs

Peter Wang novalazy at gmail.com
Thu Aug 7 14:56:49 AEST 2008


The compiler probably should warn about this, or at least not produce duplicate
procedures.

Branches: main

library/svmap.m:
	Fix an unintended duplicate `:- pragma type_spec'.

library/tree_bitset.m:
	Delete duplicate `:- pragma type_spec' lines.

diff --git a/library/svmap.m b/library/svmap.m
index a63ec71..22b0fbe 100644
--- a/library/svmap.m
+++ b/library/svmap.m
@@ -111,7 +111,7 @@
 :- pragma type_spec(svmap.det_insert(in, in, in, out), K = int).
 
 :- pragma type_spec(svmap.set(in, in, in, out), K = var(_)).
-:- pragma type_spec(svmap.set(in, in, in, out), K = var(_)).
+:- pragma type_spec(svmap.set(in, in, in, out), K = int).
 
 :- pragma type_spec(svmap.update(in, in, in, out), K = var(_)).
 :- pragma type_spec(svmap.update(in, in, in, out), K = int).
diff --git a/library/tree_bitset.m b/library/tree_bitset.m
index 661e39e..739edd8 100644
--- a/library/tree_bitset.m
+++ b/library/tree_bitset.m
@@ -309,20 +309,26 @@
 :- pragma type_spec(insert/2, T = var(_)).
 :- pragma type_spec(insert/2, T = int).
 
+:- pragma type_spec(insert/3, T = var(_)).
+:- pragma type_spec(insert/3, T = int).
+
 :- pragma type_spec(insert_list/2, T = var(_)).
 :- pragma type_spec(insert_list/2, T = int).
 
+:- pragma type_spec(insert_list/3, T = var(_)).
+:- pragma type_spec(insert_list/3, T = int).
+
 :- pragma type_spec(delete/2, T = var(_)).
 :- pragma type_spec(delete/2, T = int).
 
+:- pragma type_spec(delete/3, T = var(_)).
+:- pragma type_spec(delete/3, T = int).
+
 :- pragma type_spec(delete_list/2, T = var(_)).
 :- pragma type_spec(delete_list/2, T = int).
 
-:- pragma type_spec(foldr/3, T = int).
-:- pragma type_spec(foldr/3, T = var(_)).
-
-:- pragma type_spec(foldr/4, T = int).
-:- pragma type_spec(foldr/4, T = var(_)).
+:- pragma type_spec(delete_list/3, T = var(_)).
+:- pragma type_spec(delete_list/3, T = int).
 
 :- pragma type_spec(foldl/3, T = int).
 :- pragma type_spec(foldl/3, T = var(_)).
@@ -330,26 +336,11 @@
 :- pragma type_spec(foldl/4, T = int).
 :- pragma type_spec(foldl/4, T = var(_)).
 
-:- pragma type_spec(list_to_set/1, T = var(_)).
-:- pragma type_spec(list_to_set/1, T = int).
-
-:- pragma type_spec(sorted_list_to_set/1, T = var(_)).
-:- pragma type_spec(sorted_list_to_set/1, T = int).
-
-:- pragma type_spec(to_sorted_list/1, T = var(_)).
-:- pragma type_spec(to_sorted_list/1, T = int).
-
-:- pragma type_spec(insert/3, T = var(_)).
-:- pragma type_spec(insert/3, T = int).
-
-:- pragma type_spec(insert_list/3, T = var(_)).
-:- pragma type_spec(insert_list/3, T = int).
-
-:- pragma type_spec(delete/3, T = var(_)).
-:- pragma type_spec(delete/3, T = int).
+:- pragma type_spec(foldr/3, T = int).
+:- pragma type_spec(foldr/3, T = var(_)).
 
-:- pragma type_spec(delete_list/3, T = var(_)).
-:- pragma type_spec(delete_list/3, T = int).
+:- pragma type_spec(foldr/4, T = int).
+:- pragma type_spec(foldr/4, T = var(_)).
 
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%




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