NEWS for Mercury 22.01.6

This is a bug-fix release.

NEWS for Mercury 22.01.5

This is a bug-fix release.

NEWS for Mercury 22.01.4

This is a bug-fix release.

NEWS for Mercury 22.01.3

This is a bug-fix release.

NEWS for Mercury 22.01.2

This is a bug-fix release.

NEWS for Mercury 22.01.1

This is a bug-fix release.

NEWS for Mercury 22.01

Changes that may break compatibility

Changes to the Mercury standard library

New module: random.system_rng

Changes to the array module

Changes to the array2d module

Changes to the assoc_list module

Changes to the bag module

Changes to the bitmap module

Changes to the char module

Changes to the cord module

Changes to the dir module

Changes to the getopt module

Changes to the getopt_io module

Changes to the int module

Changes to the int32 module

Changes to the integer module

Changes to the io module

Changes to the lexer module

Changes to the list module

Changes to the map module

Changes to the maybe module

Changes to the parser module

Changes to the prolog module

Changes to the random module

Changes to the std_util module

Changes to the string module

This allows predicates such as string.format and io.format to operate on values of not just the word sized integer types int and uint, but on sized versions of them as well.

Changes to the term module

Changes to the thread module

Changes to the thread.mvar module

Changes to the thread.semaphore module

Changes to the time module

Changes to the tree234 module

Changes to the uint16 module

Changes to the uint32 module

Changes to the uint64 module

Changes to the uint8 module

Changes to the varset module

Changes to the Mercury language

A term of type real_color can be converted to a term of type color with coerce(Term). A term of type color can be converted to a term of type real_color if it has an appropriate inst. Subtypes share a common data representation with their base types, so the type conversions do not cost anything at runtime.

If the module in which this pragma occurs contains both a function init/1 and a predicate init/1, then this pragma is ambiguous. Traditionally, the Mercury compiler applied such ambiguous pragma to both the function and the predicate. The programmers who wished the pragma to apply to only one of them had to rename the other.

Now, pragmas that take a name/arity pair can specify whether they are intended to apply to a function or to a predicate by putting a func() or pred() wrapper around the name/arity pair, like this:

    :- pragma inline(func(init/1)).     % applies ONLY to func init/1.
    :- pragma inline(pred(init/1)).     % applies ONLY to pred init/1.

This new syntax applies to all of the following kinds of pragmas:

    check_termination
    consider_used
    does_not_terminate
    fact_table
    inline
    loop_check
    memo
    minimal_model
    mode_check_clauses
    no_determinism_warning
    no_inline
    obsolete
    promise_equivalent_clauses
    promise_pure
    promise_semipure
    require_tail_recursion
    terminates
    type_spec

Changes to the Mercury compiler

Portability improvements

Changes to the Mercury debugger

For news about earlier versions, see the HISTORY file.