NEWS for Mercury 11.07
----------------------

HIGHLIGHTS
==========

Changes to the Mercury language:

* The `char' type now represents a Unicode code point.

* Unicode characters can now be encoded in string literals using an
  escape sequence.  The escape sequence \uXXXX (or \UXXXXXXXX), where XXXX
  (or XXXXXXXX) is a Unicode character code in hexadecimal, is replaced with
  the corresponding Unicode character.

* Expressions used to initialise mutables may now contain impure
  or semipure function calls.

Changes to the Mercury standard library:

* We have improved Unicode support in the standard library.

* We have deprecated substring procedures which take start and count
  arguments in favour of procedures which take start and end arguments.

* We have changed the argument order of many of the predicates in the array,
  bag, bimap, eqvclass, map, multi_map, queue and set modules in order
  to make them more conducive to the use of state variable notation.

Changes to the Mercury compiler:

* Support for using clang (<http://clang.llvm.org/>) as a C compiler with
  Mercury has been added.  See README.clang for further details

* We have significantly improved support for using Microsoft Visual C as
  a C compiler with Mercury.  See README.MS-VisualC for further details.

* The Java code generated by the Java backend is now compatible with Java 1.7.

Changes to the Mercury profiler:

* We have added a new form of profiling, memory retention profiling, to mprof
  that allows it to generate reports describing the origin of objects that
  are live on the heap at selected points in a program.
  See the Mercury User's Guide for details.
  

DETAILED LISTING
================

Changes to the Mercury standard library:

* We have improved Unicode support in the standard library.

    + Procedures in the string module now understand either UTF-8 or
      UTF-16 encodings, depending upon the backend.

    + Text I/O routines now read and write files in UTF-8 encoding.

* We have deprecated substring procedures which take start and count
  arguments in favour of procedures which take start and end arguments.
  The new procedures are more convenient to call, make more sense with
  variable-width character encodings, and pave the way for potentially
  replacing string offsets with an abstract type.

* We have added additional modes for set.map/3 and set.map_fold/5.

* The argument order of the following predicates has been changed so as to
  make them more conducive to the use of state variable notation:
  array.set/4, array.semidet/4, array.slow_set/4, array.semidet_slow_set/4,
  array.resize/4, array.shrink/3, bag.insert/3, bag.insert_list/3,
  bag.insert_set/3, bag.remove/3, bag.det_remove/3, bag.remove_list/3,
  bag.remove_set/3, bag.delete/3, bag.remove_all/3, bag.delete_all/3,
  bag.remove_smallest/3, bimap.insert/4, bimap.det_insert/4, bimap.set/4,
  eqvclass.ensure_element/3, eqvclass.new_element/3,
  eqvclass.ensure_equivalence/4, eqvclass.new_equivalence/4,
  eqvclass.remove_equivalent_elements/3, map.insert/4, map.det_insert/4,
  map.det_insert_from_corresponding_lists/4,
  map.det_insert_from_assoc_list/3, map.set_from_corresponding_lists/4,
  map.set_from_assoc_list/3, map.update/4, map.det_update/4, map.delete/3,
  map.delete_list/3, map.remove/4, map.det_remove/4, map.remove_smallest/4,
  multi_map.insert/4, multi_map.det_insert/4, multi_map.update/4,
  multi_map.det_update/4, multi_map.det_replace/4, multi_map.set/4,
  multi_map.add/4, multi_map.delete/4, multi_map.remove/4, and
  multi_map.remove_smallest/4, queue.put/3, queue.put_list/3,
  queue.get/3, queue.delete_all/3, queue.put_on_front/3,
  queue.get_from_back/3, queue.put_list_on_front/3,
  queue.get_from_back/3, rbtree.insert/4, rbtree.update/4, rbtree.set/4,
  rbtree.delete/3, rbtree.remove_smallest/4, rbtree.remove_largest/4,
  set.insert/3, set.insert_list/3, set.delete/3, set.delete_list/3,
  set.remove/3, set.remove_list/3, set.remove_least/3, tree234.insert/4,
  set_bbbtree.insert/3, set_bbbtree.insert_list/3, set_bbbtree.delete/3,
  set_bbbtree.delete_list/3, set_bbbtree.remove/3, set_bbbtree.remove_list/3,
  set_bbbtree.remove_least/3, set_bbbtree.remove_largest/3,
  set_ordlist.insert/3, set_ordlist.insert_list/3, set_ordlist.delete/3,
  set_ordlist.delete_list/3, set_ordlist.remove/3, set_ordlist.remove_list/3,
  set_ordlist.remove_least/3, set_unordlist.insert/3,
  set_unordlist.insert_list/3, set_unordlist.delete/3,
  set_unordlist.delete_list/3, set_unordlist.remove/3,
  set.unordlist.remove_list/3, set_unordlist.remove_least/3,
  sparse_bitset.insert/3, sparse_bitset.insert_list/3, sparse_bitset.delete/3,
  sparse_bitset.delete_list/3, sparse_bitset.remove/3,
  sparse_bitset.remove_list/3, sparse_bitset.remove_leq/3,
  sparse_bitset.remove_gt/3, sparse_bitset.remove_least/3,
  term.create_var/3, tree234.set/4, tree234.remove/4, tree234.remove_smallest/4,
  tree234.update/4, tree_bitset.insert/3, tree_bitset.insert_list/3,
  tree_bitset.delete/3, tree_bitset.delete_list/3, tree_bitset.remove/3,
  tree_bitset.remove_list/3 and tree_bitset.remove_least/3

* We have add the following new functions for creating singleton
  maps: bimap.singleton/2, injection.singleton/2, map.singleton/2,
  rbtree.singleton/2 and tree234.singleton/2 .

* The following procedures have been added to the standard library:

	array2d.init/3
	bitmap.init/2
        cord.init/0
	hash_table.init/3
	hash_table.init_default/1
	mvar.init/0
	mvar.read/4
	mvar.try_put/5
	store.init/1
	semaphore.init/1
	semaphore.init/3
	version_array.init/2
	version_array2d.init/3
	version_bitmap.init/2
	version_hash_table.init/3
	version_hash_table.unsafe_init/3
	version_hash_table.init_default/1
	version_hash_table.unsafe_init_default/1
	version_store.init/0

   They replace the following procedures, which are now obsolete and will be
   removed in a later release:

	array2d.new/3
	bitmap.new/2
	hash_table.new/3
	hash_table.new_default/1
	semaphore.new/1
	semaphore.new/3
	store.new/1
	string.foldl2_substring/8
	string.foldl_substring/5
	string.foldl_substring/6
	string.foldr_substring/5
	string.foldr_substring/6
	string.substring/3
	string.substring/4
	string.unsafe_substring/3
	string.unsafe_substring/4
	version_array.new/2
	version_array2d.new/3
	version_bitmap.new/2
	version_hash_table.new/3
	version_hash_table.new_default/1
	version_hash_table.unsafe_new/3
	version_hash_table.unsafe_new_default/1
	version_store.new/0

* The following procedures are have been deprecated and will be removed in
  a future release: dir.basename_det/1, list.replace_nth_det/3,
  list.replace_nth_det/4, list.index0_det/2, list.index1_det/2,
  list.index0_det/2, list.index1_det/2, list.last_det/1, stack.top_det/1,
  stack.pop_det/3, string.remove_suffix_det/2, string.index_det/2,
  string.index_det/3, string.set_char_det/3, string.set_char_det/4 and
  type_desc.ground_pseudo_type_desc_type_to_type_desc_det/1.

  The versions of these procedures that use "det_" as a prefix should be
  used instead.  (We have added these where they did not already exist.) 

* The deprecated modules graph, group and relation are no longer included
  in the library.

* The following predicates have been added to the modules that provide sets
  in the library: set.is_empty/1, set_bbbtree.is_empty/1,
  set_ctree234.is_empty/1, set_ordlist.is_empty/1, set_tree234.is_empty/1,
  set_unordlist.is_empty/1, sparse_bitset.is_empty/1, tree_bitset.is_empty/1,
  set.filter/4, set_bbbtree.filter/3, set_bbbtree.filter/4, set_ctree.filter/3,
  set_ctree.filter/4, set_ordlist.filter/3, set_ordlist.filter/4,
  set_tree.filter/3, set_tree.filter/4, set_unordlist.filter/3,
  set_unordlist.filter/4, sparse_bitset.filter/3, sparse_bitset.filter/4,
  tree_bitset.filter/3, tree_bitset.filter/4.

  All the is_empty predicates are synonyms for the existing empty/1 predicates
  in those modules.

* We have added the predicate pqueue.det_remove/4.  It is like pqueue.remove/4
  except that it throws an exception instead of failing if the priority queue
  is empty.

* The new modules svlist, svstack and svpqueue provide state variable friendly
  versions of predicates in the list, stack and pqueue modules.
  (As with the other sv* modules these modules are intended to pave the
  way for an eventual change of the predicate argument ordering in the
  list, stack and pqueue modules.)

* We have added additional modes with unique and mostly-unique accumulators
  to rbtree.foldl/4, rbtree.foldl2/6 and tree_bitset.foldl/4.

* A new function, array.generate/2, and new predicate, array.generate_foldl/5,
  can be used to create and fill new arrays.

* We have added the new predicate assoc_list.foldl_keys/4 and
  assoc_list.foldl_values/4 for folding over just keys or values
  an association list.

* We have added the new function array.from_reverse_list/1, which creates
  a new array from a list with the elements of the array occurring in
  the reverse order to that of the list.

* We have added the predicate maybe.map_fold3_maybe/9 and also added
  additional modes for maybe.fold_maybe/4, maybe.map_fold_maybe/5,
  and maybe.map_fold2_maybe/7.

* The implementation of multi_map.det_update/4 has been fixed so that it
  conforms to the documented behaviour.  The new predicate multi_map.replace/4
  has been added.

For news about earlier versions, see the HISTORY file.
