[m-rev.] for review: delete obsolete predicates from stdlib

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jul 28 05:43:28 AEST 2010


There's nothing in particular to review here given that this change
consists of deleting things; the request for a review is just a final
opportunity to object to the removal of something.

--------------

Branches: main

Delete predicates from the standard library that were deprecated in Mercury
version 0.13.  (All of the following are still supported in version 10.04.)

library/io.m:
  	Delete predicates that were marked as obsolete in version 0.13.

  	Delete the binary_stream/1 type class and it's instances.
  	They are no longer needed (and were only ever required to supported
  	predicates that were deprecated.)

library/bitmap.m:
library/version_bitmap.m:
  	Delete the obsolete get/2 predicates.

library/store.m:
  	Delete an empty interface section.

library/term_to_xml.m:
  	Delete obsolete predicates.

library/bintree.m:
library/bintree_set.m:
  	Delete the contents of these modules - I haven't deleted the files
  	themselves in case we wish to re-use them.

library/library.m:
  	Remove the bintree* modules from the stdlib.

doc/Mmakefile:
  	Ignore the bintree*.m files when generating the library guide.

tests/valid/lazy_list.m:
  	Don't import bintree_set (and a couple of other unused modules).

Julien.

Index: doc/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/doc/Mmakefile,v
retrieving revision 1.54
diff -u -r1.54 Mmakefile
--- doc/Mmakefile	3 Jul 2010 08:05:23 -0000	1.54
+++ doc/Mmakefile	27 Jul 2010 15:54:15 -0000
@@ -271,6 +271,10 @@
   				;;					\
   			$(LIBRARY_DIR)/backjump.m)			\
   				;;					\
+			$(LIBRARY_DIR)/bintree.m)			\
+				;;					\
+			$(LIBRARY_DIR)/bintree_set.m)			\
+				;;					\
   			*)						\
   				echo "* `basename $$filename .m`::"; 	\
   				;;					\
@@ -309,6 +313,10 @@
   				;;					\
   			$(LIBRARY_DIR)/backjump.m)			\
   				;;					\
+			$(LIBRARY_DIR)/bintree.m)			\
+				;;					\
+			$(LIBRARY_DIR)/bintree_set.m)			\
+				;;					\
   			*)						\
   				file="`basename $$filename .m`"; 	\
   				echo "@node $$file"; 			\
Index: library/bintree.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/bintree.m,v
retrieving revision 1.52
diff -u -r1.52 bintree.m
--- library/bintree.m	23 Nov 2007 07:35:55 -0000	1.52
+++ library/bintree.m	27 Jul 2010 19:25:24 -0000
@@ -1,599 +1,3 @@
   %---------------------------------------------------------------------------%
-% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
+% THIS FILE IS NO LONGER USED.
   %---------------------------------------------------------------------------%
-% Copyright (C) 1993-1995, 1997, 1999, 2002-2007 The University of Melbourne.
-% This file may only be copied under the terms of the GNU Library General
-% Public License - see the file COPYING.LIB in the Mercury distribution.
-%-----------------------------------------------------------------------------%
-% 
-% File: bintree.m.
-% Main author: conway.
-% Stability: medium (obsolete).
-% 
-% This module exists primarily for historical reasons. It is unlikely
-% to be useful, and may not be supported in future releases.
-% You should use `map' instead.
-%
-% This file provides a straight-forward binary search tree implementation of
-% a map (dictionary).
-%
-% bintree.insert, bintree.update, and bintree.set differ only in how they
-% handle the case where the value being inserted already exists in the tree.
-% `insert' will only insert new keys, and will fail if you attempt to insert
-% an existing key into the tree. `update' will only allow you to modify the
-% data for existing keys, and will fail if the key isn't already in the tree.
-% `set' will always succeed; it will replace the old value for that key
-% if the key was already in the tree, or insert a new node into the tree
-% if the key wasn't already present.
-% 
-%-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%
-
-:- module bintree.
-:- interface.
-
-:- import_module assoc_list.
-:- import_module list.
-
-:- type bintree(K, V).
-
-:- pred bintree.init(bintree(K, V)::uo) is det.
-
-:- pred bintree.insert(bintree(K, V)::in, K::in, V::in, bintree(K, V)::out)
-    is semidet.
-
-:- pred bintree.update(bintree(K, V)::in, K::in, V::in, bintree(K, V)::out)
-    is semidet.
-
-:- pred bintree.set(bintree(K, V), K, V, bintree(K, V)).
-:- mode bintree.set(di, di, di, uo) is det.
-:- mode bintree.set(in, in, in, out) is det.
-
-:- func bintree.set(bintree(K, V), K, V) = bintree(K, V).
-
-:- pred bintree.search(bintree(K, V), K, V).
-:- mode bintree.search(in, in, in) is semidet. % implied
-:- mode bintree.search(in, in, out) is semidet.
-
-:- pred bintree.lookup(bintree(K, V)::in, K::in, V::out) is det.
-:- func bintree.lookup(bintree(K, V), K) = V.
-
-    % Search for a key-value pair using the key. If there is no entry
-    % for the given key, returns the pair for the next lower key instead.
-    % Fails if there is no key with the given or lower value.
-    %
-:- pred bintree.lower_bound_search(bintree(K, V)::in, K::in, K::out, V::out)
-    is semidet.
-
-    % Search for a key-value pair using the key. If there is no entry
-    % for the given key, returns the pair for the next lower key instead.
-    % Aborts if there is no key with the given or lower value.
-    %
-:- pred bintree.lower_bound_lookup(bintree(K, V)::in, K::in, K::out, V::out)
-    is det.
-
-    % Search for a key-value pair using the key. If there is no entry
-    % for the given key, returns the pair for the next higher key instead.
-    % Fails if there is no key with the given or higher value.
-    %
-:- pred bintree.upper_bound_search(bintree(K, V)::in, K::in, K::out, V::out)
-    is semidet.
-
-    % Search for a key-value pair using the key. If there is no entry
-    % for the given key, returns the pair for the next higher key instead.
-    % Aborts if there is no key with the given or higher value.
-    %
-:- pred bintree.upper_bound_lookup(bintree(K, V)::in, K::in, K::out, V::out)
-    is det.
-
-:- pred bintree.delete(bintree(K, V)::in, K::in, bintree(K, V)::out) is det.
-:- func bintree.delete(bintree(K, V), K) = bintree(K, V).
-
-:- pred bintree.remove(bintree(K, V)::in, K::in, V::out, bintree(K, V)::out)
-    is semidet.
-
-:- pred bintree.keys(bintree(K, _V)::in, list(K)::out) is det.
-:- func bintree.keys(bintree(K, _V)) = list(K).
-
-:- pred bintree.values(bintree(_K, V)::in, list(V)::out) is det.
-:- func bintree.values(bintree(_K, V)) = list(V).
-
-:- pred bintree.from_list(assoc_list(K, V)::in, bintree(K, V)::out) is det.
-:- func bintree.from_list(assoc_list(K, V)) = bintree(K, V).
-
-:- pred bintree.from_sorted_list(assoc_list(K, V)::in, bintree(K, V)::out)
-    is det.
-:- func bintree.from_sorted_list(assoc_list(K, V)) = bintree(K, V).
-
-:- pred bintree.from_corresponding_lists(list(K)::in, list(V)::in,
-    bintree(K, V)::out) is det.
-:- func bintree.from_corresponding_lists(list(K), list(V)) = bintree(K, V).
-
-:- pred bintree.to_list(bintree(K, V)::in, assoc_list(K, V)::out) is det.
-:- func bintree.to_list(bintree(K, V)) = assoc_list(K, V).
-
-    % Count the number of elements in a tree.
-    %
-:- pred bintree.count(bintree(_K, _V)::in, int::out) is det.
-:- func bintree.count(bintree(_K, _V)) = int.
-
-    % Count the depth of a tree.
-    %
-:- pred bintree.depth(bintree(_K, _V)::in, int::out) is det.
-:- func bintree.depth(bintree(_K, _V)) = int.
-
-:- pred bintree.branching_factor(bintree(_K, _V)::in, int::out, int::out)
-    is det.
-
-:- pred bintree.balance(bintree(K, V)::in, bintree(K, V)::out) is det.
-:- func bintree.balance(bintree(K, V)) = bintree(K, V).
-
-%-----------------------------------------------------------------------------%
-
-:- implementation.
-
-:- import_module int.
-:- import_module pair.
-:- import_module require.
-:- import_module string.
-
-:- type bintree(K, V)
-    --->    empty
-    ;       tree(K, V, bintree(K, V), bintree(K, V)).
-
-%-----------------------------------------------------------------------------%
-
-bintree.init(empty).
-
-%-----------------------------------------------------------------------------%
-
-bintree.insert(empty, Key, Value, tree(Key, Value, empty, empty)).
-bintree.insert(tree(Key0, Value0, Left, Right), Key, Value, Tree) :-
-    compare(Result, Key0, Key),
-    (
-        Result = (=),
-        fail
-    ;
-        Result = (<),
-        bintree.insert(Right, Key, Value, NewRight),
-        Tree = tree(Key0, Value0, Left, NewRight)
-    ;
-        Result = (>),
-        bintree.insert(Left, Key, Value, NewLeft),
-        Tree = tree(Key0, Value0, NewLeft, Right)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.update(empty, _Key, _Value, _Tree) :-
-    fail.
-bintree.update(tree(Key0, Value0, Left, Right), Key, Value, Tree) :-
-    compare(Result, Key0, Key),
-    (
-        Result = (=),
-        Tree = tree(Key0, Value, Left, Right)
-    ;
-        Result = (<),
-        bintree.update(Right, Key, Value, NewRight),
-        Tree = tree(Key0, Value0, Left, NewRight)
-    ;
-        Result = (>),
-        bintree.update(Left, Key, Value, NewLeft),
-        Tree = tree(Key0, Value0, NewLeft, Right)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.set(empty, Key, Value, tree(Key, Value, empty, empty)).
-bintree.set(tree(Key0, Value0, Left, Right), Key, Value, Tree) :-
-    compare(Result, Key0, Key),
-    (
-        Result = (=),
-        Tree = tree(Key0, Value, Left, Right)
-    ;
-        Result = (<),
-        bintree.set(Right, Key, Value, NewRight),
-        Tree = tree(Key0, Value0, Left, NewRight)
-    ;
-        Result = (>),
-        bintree.set(Left, Key, Value, NewLeft),
-        Tree = tree(Key0, Value0, NewLeft, Right)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.search(tree(K0, V0, Left, Right), K, V) :-
-    compare(Result, K0, K),
-    (
-        Result = (=),
-        V = V0
-    ;
-        Result = (<),
-        bintree.search(Right, K, V)
-    ;
-        Result = (>),
-        bintree.search(Left, K, V)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.lookup(Tree, K, V) :-
-    ( bintree.search(Tree, K, V0) ->
-        V = V0
-    ;
-        report_lookup_error("bintree.lookup: key not found", K, V)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.lower_bound_search(tree(K0, V0, Left, Right), SearchK, K, V) :-
-    compare(Result, K0, SearchK),
-    (
-        Result = (=),
-        K = K0,
-        V = V0
-    ;
-        Result = (<),
-        ( bintree.lower_bound_search(Right, SearchK, Kp, Vp) ->
-            K = Kp,
-            V = Vp
-        ;
-            K = K0,
-            V = V0
-        )
-    ;
-        Result = (>),
-        bintree.lower_bound_search(Left, SearchK, K, V)
-    ).
-
-bintree.lower_bound_lookup(Tree, SearchK, K, V) :-
-    ( bintree.lower_bound_search(Tree, SearchK, K0, V0) ->
-        K = K0,
-        V = V0
-    ;
-        report_lookup_error("bintree.lower_bound_lookup: " ++
-            "key not found", SearchK, V)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.upper_bound_search(tree(K0, V0, Left, Right), SearchK, K, V) :-
-    compare(Result, K0, SearchK),
-    (
-        Result = (=),
-        K = K0,
-        V = V0
-    ;
-        Result = (<),
-        bintree.upper_bound_search(Right, SearchK, K, V)
-    ;
-        Result = (>),
-        ( bintree.upper_bound_search(Left, SearchK, Kp, Vp) ->
-            K = Kp,
-            V = Vp
-        ;
-            K = K0,
-            V = V0
-        )
-    ).
-
-bintree.upper_bound_lookup(Tree, SearchK, K, V) :-
-    ( bintree.upper_bound_search(Tree, SearchK, K0, V0) ->
-        K = K0,
-        V = V0
-    ;
-        report_lookup_error("bintree.lower_bound_lookup: key not found",
-            SearchK, V)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.delete(empty, _K, empty).
-bintree.delete(tree(K0, V0, Left, Right), K, Tree) :-
-    compare(Result, K0, K),
-    (
-        Result = (=),
-        bintree.fixup(Left, Right, Tree)
-    ;
-        Result = (<),
-        bintree.delete(Right, K, Tree1),
-        Tree = tree(K0, V0, Left, Tree1)
-    ;
-        Result = (>),
-        bintree.delete(Left, K, Tree1),
-        Tree = tree(K0, V0, Tree1, Right)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.remove(tree(K0, V0, Left, Right), K, V, Tree) :-
-    compare(Result, K0, K),
-    (
-        Result = (=),
-        V = V0,
-        bintree.fixup(Left, Right, Tree)
-    ;
-        Result = (<),
-        bintree.remove(Right, K, V, Tree1),
-        Tree = tree(K0, V0, Left, Tree1)
-    ;
-        Result = (>),
-        bintree.remove(Left, K, V, Tree1),
-        Tree = tree(K0, V0, Tree1, Right)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-:- pred bintree.fixup(bintree(K, V)::in, bintree(K, V)::in,
-    bintree(K, V)::out) is det.
-
-bintree.fixup(Left, Right, Tree) :-
-    (
-        Left = empty,
-        Tree = Right
-    ;
-        Left = tree(_, _, _, _),
-        (
-            Right = empty,
-            Tree = Left
-        ;
-            Right = tree(_, _, _, _),
-            bintree.right_depth(Left, LD),
-            bintree.left_depth(Right, RD),
-            ( LD > RD ->
-                bintree.knock_left(Left, K, V, NewLeft),
-                NewRight = Right
-            ;
-                bintree.knock_right(Right, K, V, NewRight),
-                NewLeft = Left
-            ),
-            Tree = tree(K, V, NewLeft, NewRight)
-        )
-    ).
-
-:- pred bintree.right_depth(bintree(_K, _V)::in, int::out) is det.
-
-bintree.right_depth(empty, 0).
-bintree.right_depth(tree(_K, _V, _Left, Right), N) :-
-    bintree.right_depth(Right, M),
-    N = M + 1.
-
-:- pred bintree.left_depth(bintree(_K, _V)::in, int::out) is det.
-
-bintree.left_depth(empty, 0).
-bintree.left_depth(tree(_K, _V, Left, _Right), N) :-
-    bintree.left_depth(Left, M),
-    N = M + 1.
-
-:- pred bintree.knock_left(bintree(K, V)::in, K::out, V::out,
-    bintree(K, V)::out) is det.
-
-bintree.knock_left(empty, _, _, _) :-
-    error("bintree.knock_left: empty tree").
-bintree.knock_left(tree(K0, V0, Left, Right), K, V, Tree) :-
-    (
-        Right = empty,
-        K = K0,
-        V = V0,
-        Tree = Left
-    ;
-        Right = tree(_, _, _, _),
-        bintree.knock_left(Right, K, V, Right1),
-        Tree = tree(K0, V0, Left, Right1)
-    ).
-
-:- pred bintree.knock_right(bintree(K, V)::in, K::out, V::out,
-    bintree(K, V)::out) is det.
-
-bintree.knock_right(empty, _, _, _) :-
-    error("bintree.knock_right: empty tree").
-bintree.knock_right(tree(K0, V0, Left, Right), K, V, Tree) :-
-    (
-        Left = empty,
-        K = K0,
-        V = V0,
-        Tree = Right
-    ;
-        Left = tree(_, _, _, _),
-        bintree.knock_right(Left, K, V, Left1),
-        Tree = tree(K0, V0, Left1, Right)
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.from_list(List, Tree) :-
-    bintree.from_list_2(List, empty, Tree).
-
-:- pred bintree.from_list_2(assoc_list(K, V)::in, bintree(K, V)::in,
-    bintree(K, V)::out) is det.
-
-bintree.from_list_2([], Tree, Tree).
-bintree.from_list_2([K - V | List], Tree0, Tree) :-
-    ( bintree.insert(Tree0, K, V, Tree1) ->
-        Tree2 = Tree1
-    ;
-        report_lookup_error("bintree.from_list: key already present", K, V)
-    ),
-    bintree.from_list_2(List, Tree2, Tree).
-
-%-----------------------------------------------------------------------------%
-
-bintree.from_sorted_list(List, Tree) :-
-    list.length(List, Length),
-    bintree.from_sorted_list_2(Length, List, Tree, _).
-
-:- pred bintree.from_sorted_list_2(int::in, assoc_list(K, V)::in,
-    bintree(K, V)::out, assoc_list(K, V)::out) is det.
-
-bintree.from_sorted_list_2(Num, List0, Tree, List) :-
-    ( Num = 0 ->
-        List = List0,
-        Tree = empty
-    ;
-        Num1 = Num - 1,
-        SmallHalf = Num1 // 2,
-        BigHalf = Num1 - SmallHalf,
-        bintree.from_sorted_list_2(SmallHalf, List0, LeftSubTree, List1),
-        (
-            List1 = [HeadKey - HeadValue | List2],
-            Tree = tree(HeadKey, HeadValue, LeftSubTree, RightSubTree),
-            bintree.from_sorted_list_2(BigHalf, List2, RightSubTree, List)
-        ;
-            List1 = [],
-            error("bintree.from_sorted_list_2")
-        )
-    ).
-
-%-----------------------------------------------------------------------------%
-
-bintree.balance(Tree0, Tree) :-
-    bintree.to_list(Tree0, List),
-    bintree.from_sorted_list(List, Tree).
-
-%-----------------------------------------------------------------------------%
-
-bintree.from_corresponding_lists(Keys, Values, Tree) :-
-    ( bintree.from_corresponding_lists_2(Keys, Values, empty, Tree0) ->
-        Tree = Tree0
-    ;
-        error("bintree.from_corresponding_lists: " ++
-            "lists are of different lengths")
-    ).
-
-:- pred bintree.from_corresponding_lists_2(list(K)::in, list(V)::in,
-    bintree(K, V)::in, bintree(K, V)::out) is semidet.
-
-bintree.from_corresponding_lists_2([], [], Tree, Tree).
-bintree.from_corresponding_lists_2([K | Ks], [V | Vs], Tree0, Tree) :-
-    ( bintree.insert(Tree0, K, V, Tree1) ->
-        Tree2 = Tree1
-    ;
-        report_lookup_error(
-            "bintree.from_corresponding_lists: key already present", K, V)
-    ),
-    bintree.from_corresponding_lists_2(Ks, Vs, Tree2, Tree).
-
-%-----------------------------------------------------------------------------%
-
-bintree.to_list(Tree, List) :-
-    bintree.to_list_2(Tree, [], List).
-
-:- pred bintree.to_list_2(bintree(K, V)::in, assoc_list(K, V)::in,
-    assoc_list(K, V)::out) is det.
-
-bintree.to_list_2(empty, List, List).
-bintree.to_list_2(tree(K, V, Left, Right), List0, List) :-
-    bintree.to_list_2(Right, List0, List1),
-    bintree.to_list_2(Left, [K - V | List1], List).
-
-%-----------------------------------------------------------------------------%
-
-bintree.keys(Tree, List) :-
-    bintree.keys_2(Tree, [], List).
-
-:- pred bintree.keys_2(bintree(K, _V)::in, list(K)::in, list(K)::out) is det.
-
-bintree.keys_2(empty, List, List).
-bintree.keys_2(tree(K, _V, Left, Right), List0, List) :-
-    bintree.keys_2(Right, List0, List1),
-    bintree.keys_2(Left, [K | List1], List).
-
-%-----------------------------------------------------------------------------%
-
-bintree.values(Tree, List) :-
-    bintree.values_2(Tree, [], List).
-
-:- pred bintree.values_2(bintree(_K, V)::in, list(V)::in, list(V)::out)
-    is det.
-
-bintree.values_2(empty, List, List).
-bintree.values_2(tree(_K, V, Left, Right), List0, List) :-
-    bintree.values_2(Right, List0, List1),
-    bintree.values_2(Left, [V | List1], List).
-
-%-----------------------------------------------------------------------------%
-
-bintree.count(empty, 0).
-bintree.count(tree(_K, _V, Left, Right), Count) :-
-    bintree.count(Right, RightCount),
-    bintree.count(Left, LeftCount),
-    ChildCount = LeftCount + RightCount,
-    Count = ChildCount + 1.
-
-bintree.depth(empty, 0).
-bintree.depth(tree(_K, _V, Left, Right), Depth) :-
-    bintree.depth(Right, RightDepth),
-    bintree.depth(Left, LeftDepth),
-    int.max(LeftDepth, RightDepth, SubDepth),
-    Depth = SubDepth + 1.
-
-bintree.branching_factor(empty, 0, 0).
-bintree.branching_factor(tree(_K, _V, L, R), Ones, Twos) :-
-    (
-        L = empty,
-        (
-            R = empty,
-            Ones = 0,
-            Twos = 0
-        ;
-            R = tree(_, _, _, _),
-            bintree.branching_factor(R, OnesR, TwosR),
-            Ones = OnesR + 1,
-            Twos = TwosR
-        )
-    ;
-        L = tree(_, _, _, _),
-        (
-            R = empty,
-            bintree.branching_factor(L, OnesL, TwosL),
-            Ones = OnesL + 1,
-            Twos = TwosL
-        ;
-            R = tree(_, _, _, _),
-            bintree.branching_factor(L, OnesL, TwosL),
-            bintree.branching_factor(R, OnesR, TwosR),
-            Ones = OnesL + OnesR,
-            Twos = TwosL + TwosR + 1
-        )
-    ).
-
-%-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%
-% Ralph Becket <rwab1 at cl.cam.ac.uk> 29/04/99
-%   Function forms added.
-
-bintree.set(BT1, K, V) = BT2 :-
-    bintree.set(BT1, K, V, BT2).
-
-bintree.lookup(BT, K) = V :-
-    bintree.lookup(BT, K, V).
-
-bintree.delete(BT1, K) = BT2 :-
-    bintree.delete(BT1, K, BT2).
-
-bintree.keys(BT) = Ks :-
-    bintree.keys(BT, Ks).
-
-bintree.values(BT) = Vs :-
-    bintree.values(BT, Vs).
-
-bintree.from_list(AL) = BT :-
-    bintree.from_list(AL, BT).
-
-bintree.from_sorted_list(AL) = BT :-
-    bintree.from_sorted_list(AL, BT).
-
-bintree.from_corresponding_lists(Ks, Vs) = BT :-
-    bintree.from_corresponding_lists(Ks, Vs, BT).
-
-bintree.to_list(BT) = AL :-
-    bintree.to_list(BT, AL).
-
-bintree.count(BT) = N :-
-    bintree.count(BT, N).
-
-bintree.depth(BT) = N :-
-    bintree.depth(BT, N).
-
-bintree.balance(BT1) = BT2 :-
-    bintree.balance(BT1, BT2).
Index: library/bintree_set.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/bintree_set.m,v
retrieving revision 1.29
diff -u -r1.29 bintree_set.m
--- library/bintree_set.m	19 Apr 2006 05:17:50 -0000	1.29
+++ library/bintree_set.m	27 Jul 2010 19:25:53 -0000
@@ -1,333 +1,3 @@
   %---------------------------------------------------------------------------%
-% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
+% THIS FILE IS NO LONGER USED.
   %---------------------------------------------------------------------------%
-% Copyright (C) 1994-1997, 1999-2000, 2003-2006 The University of Melbourne.
-% This file may only be copied under the terms of the GNU Library General
-% Public License - see the file COPYING.LIB in the Mercury distribution.
-%--------------------------------------------------------------------------%
-% 
-% File: bintree_set.m.
-% Main authors: fjh.
-% Stability: medium (obsolete).
-% 
-% This file provides an alternate implementation of the `set' ADT defined
-% in module `set'. See that file for comments about the semantics of the
-% predicates. This file implements sets as binary sorted trees, using module
-% `bintree', and so provides different performance characteristics.
-%
-% bintree_set.is_member is a version of bintree_set.member with a more
-% restricted mode, which is implemented much more efficiently using
-% bintree.search.
-% 
-%--------------------------------------------------------------------------%
-%--------------------------------------------------------------------------%
-
-:- module bintree_set.
-:- interface.
-:- import_module list.
-
-%--------------------------------------------------------------------------%
-
-:- type bintree_set(_T).
-
-    % `bintree_set.list_to_set(List, Set)' is true iff `Set' is the set
-    % containing only the members of `List'.
-    %
-:- pragma obsolete(bintree_set.list_to_set/2).
-:- pred bintree_set.list_to_set(list(T)::in, bintree_set(T)::out) is det.
-:- pragma obsolete(bintree_set.list_to_set/1).
-:- func bintree_set.list_to_set(list(T)) = bintree_set(T).
-
-    % `bintree_set.sorted_list_to_set(List, Set)' is true iff `Set' is the set
-    % containing only the members of `List'. `List' must be sorted.
-    %
-:- pragma obsolete(bintree_set.sorted_list_to_set/2).
-:- pred bintree_set.sorted_list_to_set(list(T)::in, bintree_set(T)::out)
-    is det.
-:- pragma obsolete(bintree_set.sorted_list_to_set/1).
-:- func bintree_set.sorted_list_to_set(list(T)) = bintree_set(T).
-
-    % `bintree_set.list_to_bintree_set(Set, List)' is true iff `List' is
-    % the list of all the members of `Set', in sorted order.
-    %
-:- pragma obsolete(bintree_set.to_sorted_list/2).
-:- pred bintree_set.to_sorted_list(bintree_set(T)::in, list(T)::out) is det.
-:- pragma obsolete(bintree_set.to_sorted_list/1).
-:- func bintree_set.to_sorted_list(bintree_set(T)) = list(T).
-
-    % `bintree_set.init(Set)' is true iff `Set' is an empty set.
-    %
-:- pragma obsolete(bintree_set.init/1).
-:- pred bintree_set.init(bintree_set(T)::uo) is det.
-:- pragma obsolete(bintree_set.init/0).
-:- func bintree_set.init = bintree_set(T).
-
-:- pragma obsolete(bintree_set.singleton_set/2).
-:- pred bintree_set.singleton_set(bintree_set(T)::out, T::in) is det.
-
-    % `bintree_set.equal(SetA, SetB)' is true iff `SetA' and `SetB'
-    % contain the same elements.
-    %
-:- pragma obsolete(bintree_set.equal/2).
-:- pred bintree_set.equal(bintree_set(T)::in, bintree_set(T)::in) is semidet.
-
-    % `bintree_set.subset(SetA, SetB)' is true iff `SetA' is a subset
-    % of `SetB'.
-    %
-:- pragma obsolete(bintree_set.subset/2).
-:- pred bintree_set.subset(bintree_set(T)::in, bintree_set(T)::in) is semidet.
-
-    % `bintree_set.superset(SetA, SetB)' is true iff `SetA' is a superset
-    % of `SetB'.
-    %
-:- pragma obsolete(bintree_set.superset/2).
-:- pred bintree_set.superset(bintree_set(T)::in, bintree_set(T)::in)
-    is semidet.
-
-    % `bintree_set_member(X, Set)' is true iff `X' is a member of `Set'.
-    %
-:- pragma obsolete(bintree_set.member/2).
-:- pred bintree_set.member(T, bintree_set(T)).
-:- mode bintree_set.member(in, in) is semidet.
-:- mode bintree_set.member(out, in) is nondet.
-
-    % `bintree_set.is_member(X, Set)' is true iff `X' is a member of `Set'.
-    %
-:- pragma obsolete(bintree_set.is_member/2).
-:- pred bintree_set.is_member(T::in, bintree_set(T)::in) is semidet.
-
-    % `bintree_set.contains(Set, X)' is true iff `X' is a member of `Set'.
-    %
-:- pragma obsolete(bintree_set.contains/2).
-:- pred bintree_set.contains(bintree_set(T)::in, T::in) is semidet.
-
-    % `bintree_set.insert(Set0, X, Set)' is true iff `Set' is the union of
-    % `Set0' and the set containing only `X'.
-    %
-:- pragma obsolete(bintree_set.insert/3).
-:- pred bintree_set.insert(bintree_set(T), T, bintree_set(T)).
-:- mode bintree_set.insert(di, di, uo) is det.
-:- mode bintree_set.insert(in, in, out) is det.
-
-:- pragma obsolete(bintree_set.insert/2).
-:- func bintree_set.insert(bintree_set(T), T) = bintree_set(T).
-
-    % `bintree_set.insert_list(Set0, Xs, Set)' is true iff `Set' is the union
-    % of `Set0' and the set containing only the members of `Xs'.
-    %
-:- pragma obsolete(bintree_set.insert_list/3).
-:- pred bintree_set.insert_list(bintree_set(T), list(T), bintree_set(T)).
-:- mode bintree_set.insert_list(di, di, uo) is det.
-:- mode bintree_set.insert_list(in, in, out) is det.
-
-:- pragma obsolete(bintree_set.insert_list/2).
-:- func bintree_set.insert_list(bintree_set(T), list(T)) = bintree_set(T).
-
-    % `bintree_set.remove(Set0, X, Set)' is true iff `Set0' contains `X',
-    % and `Set' is the relative complement of `Set0' and the set containing
-    % only `X', i.e.  if `Set' is the set which contains all the elements
-    % of `Set0' except `X'.
-    %
-:- pragma obsolete(bintree_set.remove/3).
-:- pred bintree_set.remove(bintree_set(T), T, bintree_set(T)).
-:- mode bintree_set.remove(in, in, out) is semidet.
-% The following mode could be implemented, but hasn't been:
-% :- mode bintree_set.remove(in, out, out) is nondet.
-
-    % `bintree_set.remove_list(Set0, Xs, Set)' is true iff Xs does not contain
-    % any duplicates, `Set0' contains every member of % `Xs', and `Set' is
-    % the relative complement of `Set0' and the set containing only the
-    % members of `Xs'.
-    %
-:- pragma obsolete(bintree_set.remove_list/3).
-:- pred bintree_set.remove_list(bintree_set(T)::in, list(T)::in,
-    bintree_set(T)::out) is semidet.
-
-    % `bintree_set.delete(Set0, X, Set)' is true iff `Set' is the relative
-    % complement of `Set0' and the set containing only `X', i.e. if `Set'
-    % is the set which contains all the elements of `Set0' except `X'.
-    %
-:- pragma obsolete(bintree_set.delete/3).
-:- pred bintree_set.delete(bintree_set(T)::in, T::in, bintree_set(T)::out)
-    is det.
-:- pragma obsolete(bintree_set.delete/2).
-:- func bintree_set.delete(bintree_set(T), T) = bintree_set(T).
-
-    % `bintree_set.delete_list(Set0, Xs, Set)' is true iff `Set' is the
-    % relative complement of `Set0' and the set containing only the members
-    % of `Xs'.
-    %
-:- pragma obsolete(bintree_set.delete_list/3).
-:- pred bintree_set.delete_list(bintree_set(T)::in, list(T)::in,
-    bintree_set(T)::out) is det.
-
-:- pragma obsolete(bintree_set.delete_list/2).
-:- func bintree_set.delete_list(bintree_set(T), list(T)) = bintree_set(T).
-
-    % `set_union(SetA, SetB, Set)' is true iff `Set' is the union of
-    % `SetA' and `SetB'. If the sets are known to be of different sizes,
-    % then for efficiency make `SetA' the larger of the two.
-    %
-:- pragma obsolete(bintree_set.union/3).
-:- pred bintree_set.union(bintree_set(T)::in, bintree_set(T)::in,
-    bintree_set(T)::out) is det.
-:- pragma obsolete(bintree_set.union/2).
-:- func bintree_set.union(bintree_set(T), bintree_set(T)) = bintree_set(T).
-
-    % `set_intersect(SetA, SetB, Set)' is true iff `Set' is the
-    % intersection of `SetA' and `SetB'.
-    %
-:- pragma obsolete(bintree_set.intersect/3).
-:- pred bintree_set.intersect(bintree_set(T)::in, bintree_set(T)::in,
-    bintree_set(T)::out) is det.
-:- pragma obsolete(bintree_set.intersect/2).
-:- func bintree_set.intersect(bintree_set(T), bintree_set(T))
-    = bintree_set(T).
-
-%--------------------------------------------------------------------------%
-
-:- implementation.
-
-:- import_module assoc_list.
-:- import_module bintree.
-:- import_module pair.
-:- import_module unit.
-
-:- type bintree_set(T)          ==      bintree(T, unit).
-
-%--------------------------------------------------------------------------%
-
-bintree_set.list_to_set(List, Set) :-
-    list.sort_and_remove_dups(List, SortedList),
-    bintree_set.sorted_list_to_set(SortedList, Set).
-
-bintree_set.sorted_list_to_set(List, Set) :-
-    assoc_unit(List, AssocList),
-    bintree.from_sorted_list(AssocList, Set).
-
-bintree_set.to_sorted_list(Set, List) :-
-    bintree.keys(Set, List).
-
-:- pred assoc_unit(list(T)::in, assoc_list(T, unit)::out) is det.
-
-assoc_unit([], []).
-assoc_unit([X | Xs], [X - unit | Ys]) :-
-    assoc_unit(Xs, Ys).
-
-%--------------------------------------------------------------------------%
-
-bintree_set.init(Set) :-
-    bintree.init(Set).
-
-bintree_set.singleton_set(Set, Elem) :-
-    bintree.init(Set0),
-    bintree.set(Set0, Elem, unit, Set).
-
-bintree_set.equal(SetA, SetB) :-
-    bintree.keys(SetA, SortedElements),
-    bintree.keys(SetB, SortedElements).
-
-%--------------------------------------------------------------------------%
-
-bintree_set.subset(S0, S1) :-
-    bintree.keys(S0, SortedElements0),
-    bintree_set.contains_list(SortedElements0, S1).
-
-:- pred bintree_set.contains_list(list(T)::in, bintree_set(T)::in) is semidet.
-
-bintree_set.contains_list([E|Es], S) :-
-    bintree.search(S, E, _),
-    bintree_set.contains_list(Es, S).
-
-bintree_set.superset(S0, S1) :-
-    bintree_set.subset(S1, S0).
-
-%--------------------------------------------------------------------------%
-
-bintree_set.member(E, S) :-
-    bintree.keys(S, Elements),
-    list.member(E, Elements).
-
-bintree_set.is_member(E, S) :-
-    bintree.search(S, E, _).
-
-bintree_set.contains(S, E) :-
-    bintree_set.is_member(E, S).
-
-%--------------------------------------------------------------------------%
-
-bintree_set.insert_list(S, [], S).
-bintree_set.insert_list(S0, [E|Es], S) :-
-    bintree_set.insert(S0, E, S1),
-    bintree_set.insert_list(S1, Es, S).
-
-bintree_set.insert(S0, E, S) :-
-    bintree.set(S0, E, unit, S).
-
-%--------------------------------------------------------------------------%
-
-bintree_set.remove_list(S, [], S).
-bintree_set.remove_list(S0, [X | Xs], S) :-
-    bintree_set.member(X, S0),
-    bintree_set.remove(S0, X, S1),
-    bintree_set.remove_list(S1, Xs, S).
-
-bintree_set.remove(S0, E, S) :-
-    bintree.remove(S0, E, _, S).
-
-%--------------------------------------------------------------------------%
-
-bintree_set.delete_list(S, [], S).
-bintree_set.delete_list(S0, [X | Xs], S) :-
-    bintree_set.delete(S0, X, S1),
-    bintree_set.delete_list(S1, Xs, S).
-
-bintree_set.delete(S0, E, S) :-
-    bintree.delete(S0, E, S).
-
-%--------------------------------------------------------------------------%
-
-bintree_set.union(S0, S1, S) :-
-    bintree.to_list(S0, L0),
-    bintree.to_list(S1, L1),
-    list.merge(L0, L1, L),
-    bintree.from_sorted_list(L, S).
-
-bintree_set.intersect(S0, S1, S) :-
-    bintree.keys(S1, L1),
-    bintree_set.delete_list(S0, L1, S).
-
-%--------------------------------------------------------------------------%
-%--------------------------------------------------------------------------%
-% Ralph Becket <rwab1 at cl.cam.ac.uk> 29/04/99
-%   Function forms added.
-
-bintree_set.init = BT :-
-    bintree_set.init(BT).
-
-bintree_set.list_to_set(Xs) = BT :-
-    bintree_set.list_to_set(Xs, BT).
-
-bintree_set.sorted_list_to_set(Xs) = BT :-
-    bintree_set.sorted_list_to_set(Xs, BT).
-
-bintree_set.to_sorted_list(BT) = Xs :-
-    bintree_set.to_sorted_list(BT, Xs).
-
-bintree_set.insert(BT1, X) = BT2 :-
-    bintree_set.insert(BT1, X, BT2).
-
-bintree_set.insert_list(BT1, Xs) = BT2 :-
-    bintree_set.insert_list(BT1, Xs, BT2).
-
-bintree_set.delete(BT1, X) = BT2 :-
-    bintree_set.delete(BT1, X, BT2).
-
-bintree_set.delete_list(BT1, Xs) = BT2 :-
-    bintree_set.delete_list(BT1, Xs, BT2).
-
-bintree_set.union(BT1, BT2) = BT3 :-
-    bintree_set.union(BT1, BT2, BT3).
-
-bintree_set.intersect(BT1, BT2) = BT3 :-
-    bintree_set.intersect(BT1, BT2, BT3).
Index: library/bitmap.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/bitmap.m,v
retrieving revision 1.35
diff -u -r1.35 bitmap.m
--- library/bitmap.m	7 May 2010 03:12:24 -0000	1.35
+++ library/bitmap.m	27 Jul 2010 15:09:13 -0000
@@ -425,23 +425,6 @@
   :- pred throw_bounds_error(bitmap::in, string::in, bit_index::in, num_bits::in)
       is erroneous.

-    % Replaced by BM ^ bits(I).
-
-    % get(BM, I) returns `yes' if is_set(BM, I) and `no' otherwise.
-    %
-:- func get(bitmap, int) = bool.
-%:- mode get(bitmap_ui, in) = out is det.
-:- mode get(in, in) = out is det.
-:- pragma obsolete(get/2).
-
-    % Unsafe version of the above: if the index is out of range
-    % then behaviour is undefined and bad things are likely to happen.
-    %
-:- func unsafe_get(bitmap, int) = bool.
-%:- mode unsafe_get(bitmap_ui, in) = out is det.
-:- mode unsafe_get(in, in) = out is det.
-:- pragma obsolete(unsafe_get/2).
-
   %-----------------------------------------------------------------------------%

   :- implementation.
@@ -822,14 +805,6 @@

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

-get(BM, I) = BM ^ bit(I).
-
-%------------------------------------------------------------------------------%
-
-unsafe_get(BM, I) = BM ^ unsafe_bit(I).
-
-%-----------------------------------------------------------------------------%
-
   complement(BM) =
       clear_filler_bits(complement_2(byte_index_for_bit(num_bits(BM) - 1), BM)).

Index: library/io.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.434
diff -u -r1.434 io.m
--- library/io.m	7 Jul 2010 07:33:57 -0000	1.434
+++ library/io.m	27 Jul 2010 15:12:28 -0000
@@ -984,23 +984,6 @@
   :- pred io.write_byte(io.binary_output_stream::in, int::in, io::di, io::uo)
       is det.

-    % Writes several bytes to the current binary output stream.
-    % The bytes are taken from a string.
-    % A string is poor choice of data structure to hold raw bytes.
-    % Use io.write_bitmap/3 instead.
-    %
-:- pred io.write_bytes(string::in, io::di, io::uo) is det.
-:- pragma obsolete(io.write_bytes/3).
-
-    % Writes several bytes to the specified binary output stream.
-    % The bytes are taken from a string.
-    % A string is poor choice of data structure to hold raw bytes.
-    % Use io.write_bitmap/4 instead.
-    %
-:- pred io.write_bytes(io.binary_output_stream::in, string::in,
-    io::di, io::uo) is det.
-:- pragma obsolete(io.write_bytes/4).
-
       % Write a bitmap to the current binary output stream.
       % The bitmap must not contain a partial final byte.
       %
@@ -1038,22 +1021,6 @@
   :- pred io.flush_binary_output(io.binary_output_stream::in,
       io::di, io::uo) is det.

-    % The following typeclass and instances are required for the
-    % deprecated predicates io.seek_binary/5 io.binary_stream_offset/4 to work.
-    % They will be deleted when those predicate are.
-    %
-:- typeclass io.binary_stream(T).
-:- instance  io.binary_stream(io.binary_input_stream).
-:- instance  io.binary_stream(io.binary_output_stream).
-
-    % Seek to an offset relative to Whence (documented above)
-    % on a specified binary stream. Attempting to seek on a pipe
-    % or tty results in implementation dependent behaviour.
-    %
-:- pragma obsolete(io.seek_binary/5).
-:- pred io.seek_binary(T::in, io.whence::in, int::in, io::di, io::uo)
-    is det <= io.binary_stream(T).
-
       % Seek to an offset relative to Whence (documented above)
       % on a specified binary input stream. Attempting to seek on a pipe
       % or tty results in implementation dependent behaviour.
@@ -1070,16 +1037,6 @@
   :- pred io.seek_binary_output(io.binary_output_stream::in, io.whence::in,
       int::in, io::di, io::uo) is det.

-    % Returns the offset (in bytes) into the specified binary stream.
-    %
-    % NOTE: this predicate is deprecated; please use either
-    %       io.binary_input_stream_offset or io.binary_output_stream_offset
-    %       instead.
-    %
-:- pragma obsolete(io.binary_stream_offset/4).
-:- pred io.binary_stream_offset(T::in, int::out, io::di, io::uo)
-    is det <= io.binary_stream(T).
-
       % Returns the offset (in bytes) into the specified binary input stream.
       %
   :- pred io.binary_input_stream_offset(io.binary_input_stream::in, int::out,
@@ -7629,15 +7586,6 @@
       MR_update_io(IO0, IO);
   ").

-:- pragma foreign_proc("C",
-    io.write_bytes(Message::in, IO0::di, IO::uo),
-    [may_call_mercury, promise_pure, tabled_for_io, thread_safe, terminates,
-        does_not_affect_liveness, no_sharing],
-"{
-    mercury_print_binary_string(mercury_current_binary_output(), Message);
-    MR_update_io(IO0, IO);
-}").
-
   io.write_bitmap(Bitmap, !IO) :-
       io.binary_output_stream(Stream, !IO),
       io.write_bitmap(Stream, Bitmap, !IO).
@@ -7720,13 +7668,6 @@
   ").

   :- pragma foreign_proc("C#",
-    io.write_bytes(Message::in, _IO0::di, _IO::uo),
-    [may_call_mercury, promise_pure, thread_safe, tabled_for_io, terminates],
-"{
-    mercury_print_binary_string(mercury_current_binary_output, Message);
-}").
-
-:- pragma foreign_proc("C#",
       io.flush_output(_IO0::di, _IO::uo),
       [may_call_mercury, promise_pure, thread_safe, tabled_for_io, terminates],
   "
@@ -7774,13 +7715,6 @@
   ").

   :- pragma foreign_proc("Java",
-    io.write_bytes(Message::in, _IO0::di, _IO::uo),
-    [may_call_mercury, promise_pure, thread_safe, tabled_for_io, terminates],
-"
-    io.mercury_current_binary_output.get().write_or_throw(Message);
-").
-
-:- pragma foreign_proc("Java",
       io.flush_output(_IO0::di, _IO::uo),
       [may_call_mercury, promise_pure, thread_safe, tabled_for_io, terminates],
   "
@@ -7828,14 +7762,6 @@
   ").

   :- pragma foreign_proc("Erlang",
-    io.write_bytes(Bytes::in, _IO0::di, _IO::uo),
-    [may_call_mercury, promise_pure, thread_safe, tabled_for_io, terminates],
-"
-    Stream = ?ML_get_current_binary_output,
-    mercury__io:mercury_write_string(Stream, Bytes)
-").
-
-:- pragma foreign_proc("Erlang",
       io.flush_output(_IO0::di, _IO::uo),
       [will_not_call_mercury, promise_pure, thread_safe, tabled_for_io,
           terminates],
@@ -7866,23 +7792,6 @@
   whence_to_int(cur, 1).
   whence_to_int(end, 2).

-:- typeclass io.binary_stream(T) where [
-    func extract_stream(T) = io.stream
-].
-
-:- instance io.binary_stream(io.binary_input_stream) where [
-    (extract_stream(binary_input_stream(Stream)) = Stream)
-].
-
-:- instance io.binary_stream(io.binary_output_stream) where [
-    (extract_stream(binary_output_stream(Stream)) = Stream)
-].
-
-io.seek_binary(Stream, Whence, Offset, IO0, IO) :-
-    whence_to_int(Whence, Flag),
-    RealStream = extract_stream(Stream),
-    io.seek_binary_2(RealStream, Flag, Offset, IO0, IO).
-
   io.seek_binary_input(binary_input_stream(Stream), Whence, Offset, !IO) :-
       whence_to_int(Whence, Flag),
       io.seek_binary_2(Stream, Flag, Offset, !IO).
@@ -7911,10 +7820,6 @@
       MR_update_io(IO0, IO);
   ").

-io.binary_stream_offset(Stream, Offset, !IO) :-
-    RealStream = extract_stream(Stream),
-    io.binary_stream_offset_2(RealStream, Offset, !IO).
-
   io.binary_input_stream_offset(binary_input_stream(Stream), Offset, !IO) :-
       io.binary_stream_offset_2(Stream, Offset, !IO).

@@ -8023,9 +7928,6 @@
       MR_update_io(IO0, IO);
   ").

-io.write_bytes(binary_output_stream(Stream), Message, !IO) :-
-    io.write_bytes_2(Stream, Message, !IO).
-
   :- pred io.write_bytes_2(io.stream::in, string::in, io::di, io::uo) is det.
   :- pragma foreign_proc("C",
       io.write_bytes_2(Stream::in, Message::in, IO0::di, IO::uo),
Index: library/library.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/library.m,v
retrieving revision 1.124
diff -u -r1.124 library.m
--- library/library.m	19 Aug 2009 07:45:12 -0000	1.124
+++ library/library.m	27 Jul 2010 15:15:22 -0000
@@ -50,8 +50,6 @@
   :- import_module bag.
   :- import_module benchmarking.
   :- import_module bimap.
-:- import_module bintree.
-:- import_module bintree_set.
   :- import_module bitmap.
   :- import_module bit_buffer.
   :- import_module bit_buffer.read.
@@ -222,8 +220,6 @@
   mercury_std_library_module("bag").
   mercury_std_library_module("benchmarking").
   mercury_std_library_module("bimap").
-mercury_std_library_module("bintree").
-mercury_std_library_module("bintree_set").
   mercury_std_library_module("bitmap").
   mercury_std_library_module("bit_buffer").
   mercury_std_library_module("bit_buffer.read").
Index: library/store.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/store.m,v
retrieving revision 1.66
diff -u -r1.66 store.m
--- library/store.m	17 Jun 2009 07:48:16 -0000	1.66
+++ library/store.m	27 Jul 2010 15:28:30 -0000
@@ -230,12 +230,6 @@
       S::di, S::uo) is det <= store(S).

   %-----------------------------------------------------------------------------%
-%
-% Interfaces retained only for backwards compatibility.
-% Some of these are unsafe.  All of them are deprecated.
-%
-
-%-----------------------------------------------------------------------------%
   %-----------------------------------------------------------------------------%

   :- implementation.
Index: library/term_to_xml.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/term_to_xml.m,v
retrieving revision 1.19
diff -u -r1.19 term_to_xml.m
--- library/term_to_xml.m	23 Nov 2007 07:35:58 -0000	1.19
+++ library/term_to_xml.m	27 Jul 2010 15:24:11 -0000
@@ -470,90 +470,6 @@
       in, in, di, uo) is cc_multi.

   %-----------------------------------------------------------------------------%
-% The following predicates are all deprecated.  They will be removed
-% after the next official release.
-%
-
-:- import_module io.
-
-:- pragma obsolete(write_xml_doc/3).
-:- pred write_xml_doc(T::in, io::di, io::uo) is det <= xmlable(T).
-
-:- pragma obsolete(write_xml_doc_to_stream/4).
-:- pred write_xml_doc_to_stream(io.output_stream::in, T::in, io::di, io::uo)
-    is det <= xmlable(T).
-
-:- pragma obsolete(write_xml_doc_style_dtd/5).
-:- pred write_xml_doc_style_dtd(T::in, maybe_stylesheet::in,
-    maybe_dtd::in(non_embedded_dtd), io::di, io::uo) is det <= xmlable(T).
-
-:- pragma obsolete(write_xml_doc_style_dtd_stream/6).
-:- pred write_xml_doc_style_dtd_stream(io.output_stream::in, T::in,
-    maybe_stylesheet::in, maybe_dtd::in(non_embedded_dtd), io::di, io::uo)
-    is det <= xmlable(T).
-
-:- pragma obsolete(write_xml_element/4).
-:- pred write_xml_element(int::in, T::in, io::di, io::uo) is det <= xmlable(T).
-
-:- pragma obsolete(write_xml_element_to_stream/5).
-:- pred write_xml_element_to_stream(io.output_stream::in, int::in, T::in,
-    io::di, io::uo) is det <= xmlable(T).
-
-:- pragma obsolete(write_xml_header/3).
-:- pred write_xml_header(maybe(string)::in, io::di, io::uo) is det.
-
-:- pragma obsolete(write_xml_doc_general/7).
-:- pred write_xml_doc_general(T::in, element_mapping::in(element_mapping),
-    maybe_stylesheet::in, maybe_dtd::in, dtd_generation_result::out,
-    io::di, io::uo) is det.
-
-:- pragma obsolete(write_xml_doc_general_to_stream/8).
-:- pred write_xml_doc_general_to_stream(io.output_stream::in, T::in,
-    element_mapping::in(element_mapping), maybe_stylesheet::in,
-    maybe_dtd::in, dtd_generation_result::out, io::di, io::uo) is det.
-
-:- pragma obsolete(write_xml_doc_general_cc/7).
-:- pred write_xml_doc_general_cc(T::in, element_mapping::in(element_mapping),
-    maybe_stylesheet::in, maybe_dtd::in, dtd_generation_result::out,
-    io::di, io::uo) is cc_multi.
-
-:- pragma obsolete(write_xml_doc_general_cc_to_stream/8).
-:- pred write_xml_doc_general_cc_to_stream(io.output_stream::in, T::in,
-    element_mapping::in(element_mapping), maybe_stylesheet::in,
-    maybe_dtd::in, dtd_generation_result::out, io::di, io::uo) is cc_multi.
-
-:- pragma obsolete(write_dtd/5).
-:- pred write_dtd(T::unused, element_mapping::in(element_mapping),
-    dtd_generation_result::out, io::di, io::uo) is det.
-
-:- pragma obsolete(write_dtd_to_stream/6).
-:- pred write_dtd_to_stream(io.output_stream::in, T::unused,
-    element_mapping::in(element_mapping), dtd_generation_result::out,
-    io::di, io::uo) is det.
-
-:- pragma obsolete(write_dtd_from_type/5).
-:- pred write_dtd_from_type(type_desc::in,
-    element_mapping::in(element_mapping), dtd_generation_result::out,
-    io::di, io::uo) is det.
-
-:- pragma obsolete(write_dtd_from_type_to_stream/6).
-:- pred write_dtd_from_type_to_stream(io.output_stream::in, type_desc::in,
-    element_mapping::in(element_mapping), dtd_generation_result::out,
-    io::di, io::uo) is det.
-
-:- pragma obsolete(write_xml_element_general/6).
-:- pred write_xml_element_general(deconstruct.noncanon_handling,
-    element_mapping, int, T, io, io).
-:- mode write_xml_element_general(in(do_not_allow), in(element_mapping),
-    in, in, di, uo) is det.
-:- mode write_xml_element_general(in(canonicalize), in(element_mapping),
-    in, in, di, uo) is det.
-:- mode write_xml_element_general(in(include_details_cc), in(element_mapping),
-    in, in, di, uo) is cc_multi.
-:- mode write_xml_element_general(in, in(element_mapping),
-    in, in, di, uo) is cc_multi.
-
-%-----------------------------------------------------------------------------%
   %-----------------------------------------------------------------------------%

   :- implementation.
@@ -1726,73 +1642,5 @@
       ).

   %-----------------------------------------------------------------------------%
-
-write_xml_doc(Term, !IO) :-
-    io.output_stream(Stream, !IO),
-    write_xml_doc(Stream, Term, !IO).
-
-write_xml_doc_to_stream(Stream, Term, !IO) :-
-    write_xml_doc(Stream, Term, !IO).
-
-write_xml_doc_style_dtd(Term, MaybeStyleSheet, MaybeDTD, !IO) :-
-    io.output_stream(Stream, !IO),
-    write_xml_doc_style_dtd(Stream, Term, MaybeStyleSheet, MaybeDTD, !IO).
-
-write_xml_doc_style_dtd_stream(Stream, Term, MaybeStyleSheet, MaybeDTD, !IO) :-
-    write_xml_doc_style_dtd(Stream, Term, MaybeStyleSheet, MaybeDTD, !IO).
-
-write_xml_element(Indent, Term, !IO) :-
-    io.output_stream(Stream, !IO),
-    write_xml_element(Stream, Indent, Term, !IO).
-
-write_xml_element_to_stream(Stream, Indent, Term, !IO) :-
-    write_xml_element(Stream, Indent, Term, !IO).
-
-write_xml_header(MaybeEncoding, !IO) :-
-    io.output_stream(Stream, !IO),
-    write_xml_header(Stream, MaybeEncoding, !IO).
-
-write_xml_doc_general(Term, Mapping, MaybeStyleSheet, MaybeDTD,
-        DTDGenerationResult, !IO) :-
-    io.output_stream(Stream, !IO),
-    write_xml_doc_general(Stream, Term, Mapping, MaybeStyleSheet, MaybeDTD,
-            DTDGenerationResult, !IO).
-
-write_xml_doc_general_to_stream(Stream, Term, Mapping, MaybeStyleSheet,
-        MaybeDTD, DTDGenerationResult, !IO) :-
-    write_xml_doc_general(Stream, Term, Mapping, MaybeStyleSheet, MaybeDTD,
-            DTDGenerationResult, !IO).
-
-write_xml_doc_general_cc(Term, Mapping, MaybeStyleSheet, MaybeDTD,
-        DTDGenerationResult, !IO) :-
-    io.output_stream(Stream, !IO),
-    write_xml_doc_general_cc(Stream, Term, Mapping, MaybeStyleSheet, MaybeDTD,
-            DTDGenerationResult, !IO).
-
-write_xml_doc_general_cc_to_stream(Stream, Term, Mapping, MaybeStyleSheet,
-        MaybeDTD, DTDGenerationResult, !IO) :-
-    write_xml_doc_general_cc(Stream, Term, Mapping, MaybeStyleSheet, MaybeDTD,
-            DTDGenerationResult, !IO).
-
-write_dtd(Term, Mapping, DTDGenerationResult, !IO) :-
-    io.output_stream(Stream, !IO),
-    write_dtd(Stream, Term, Mapping, DTDGenerationResult, !IO).
-
-write_dtd_to_stream(Stream, Term, Mapping, DTDGenerationResult, !IO) :-
-    write_dtd(Stream, Term, Mapping, DTDGenerationResult, !IO).
-
-write_dtd_from_type(Type, Mapping, DTDGenerationResult, !IO) :-
-    io.output_stream(Stream, !IO),
-    write_dtd_from_type(Stream, Type, Mapping, DTDGenerationResult, !IO).
-
-write_dtd_from_type_to_stream(Stream, Type, Mapping, DTDGenerationResult, !IO)
-        :-
-    write_dtd_from_type(Stream, Type, Mapping, DTDGenerationResult, !IO).
-
-write_xml_element_general(NonCanon, Mapping, Indent, Term, !IO) :-
-    io.output_stream(Stream, !IO),
-    write_xml_element_general(Stream, NonCanon, Mapping, Indent, Term, !IO).
-
-%-----------------------------------------------------------------------------%
   :- end_module term_to_xml.
   %-----------------------------------------------------------------------------%
Index: library/version_bitmap.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/version_bitmap.m,v
retrieving revision 1.7
diff -u -r1.7 version_bitmap.m
--- library/version_bitmap.m	13 Feb 2007 01:58:55 -0000	1.7
+++ library/version_bitmap.m	27 Jul 2010 15:21:17 -0000
@@ -113,15 +113,6 @@

   :- implementation.

-:- interface.
-
-    % get(BM, I) returns `yes' if is_set(BM, I) and `no' otherwise.
-    % Replaced by `BM ^ bit(I)'.
-:- func get(version_bitmap, int) = bool.
-:- pragma obsolete(get/2).
-
-:- implementation.
-
   :- import_module exception.
   :- import_module int.
   :- import_module require.
@@ -259,10 +250,6 @@

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

-get(BM, I) = ( if is_clear(BM, I) then no else yes ).
-
-%-----------------------------------------------------------------------------%
-
   copy(BM) = version_array.copy(BM).

   %-----------------------------------------------------------------------------%
Index: tests/valid/lazy_list.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/valid/lazy_list.m,v
retrieving revision 1.4
diff -u -r1.4 lazy_list.m
--- tests/valid/lazy_list.m	29 Sep 2004 04:36:28 -0000	1.4
+++ tests/valid/lazy_list.m	27 Jul 2010 19:21:52 -0000
@@ -13,11 +13,9 @@
   %---------------------------------------------------------------------------%

   :- module lazy_list.
-
   :- interface.

-:- import_module int, list.
-:- import_module std_util.
+:- import_module list.

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

@@ -316,7 +314,7 @@

   :- implementation.

-:- import_module bintree_set, require.
+:- import_module require.

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


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