Commit Graph

827 Commits

Author SHA1 Message Date
Zoltan Somogyi
2a1f376c5d Use spaces in all Mercury.options files.
Use consistent indentation.

Sort many blocks of module-specific MCFLAGS settings by module name.

Add XXXs about some questionable options.
2025-12-06 10:39:04 +11:00
Zoltan Somogyi
f2ac8bc60a Merge --warn-interface-imports into --warn-unused-interface-imports.
compiler/options.m:
    Merge the two options into one, which can be specified by either name.

compiler/module_qual.m:
    Update their documentation.

compiler/module_qual.qualify_items.m:
    Conform to the change above.

tests/warnings/help_text.err_exp:
    Expect the merged option's documentation.

NEWS.md:
    Announce the new option name.

RELEASE_NOTES_NEXT:
    Schedule the old option name for deletion.

extras/base64/Mercury.options:
extras/fixed/Mercury.options:
extras/graphics/mercury_allegro/Mercury.options:
extras/graphics/mercury_cairo/Mercury.options:
extras/graphics/mercury_glfw/Mercury.options:
extras/graphics/mercury_glut/Mercury.options:
extras/graphics/mercury_glut/Mmakefile:
extras/graphics/mercury_glut/Mmakefile.MacOSX:
extras/graphics/mercury_opengl/Mercury.options:
extras/graphics/mercury_opengl/Mmakefile:
extras/graphics/mercury_opengl/Mmakefile.MacOSX:
extras/odbc/Mercury.options:
extras/odbc/Mmakefile:
extras/references/Mercury.options:
extras/solver_types/library/Mercury.options:
extras/solver_types/library/Mmakefile:
extras/trail/Mercury.options:
tests/submodules/Mercury.options:
tests/warnings/Mercury.options:
    Replace all references to --warn-interface-imports with
    --warn-unused-interface-imports, the new preferred name.

    In several places, compiler options (both module-specific
    and otherwise) were specified in Mmakefiles. Move them
    to Mercury.options files. In some cases, this meant creating
    new Mercury.options files.
2025-11-29 02:23:32 +11:00
Julien Fischer
6dc101827a Fix compilation of extras/xml.
extras/xml/parsing.m:
    Avoid a warning about initial and final state variables being the same
    in a predicate.  That is true, but changing the predicate signature is
    incompatible with the use of DCGs in this library.
2025-05-27 16:10:28 +10:00
Julien Fischer
2f13f76e98 Avoid warnings in extras and benchmarks.
benchmarks/prog/icfp2000_no_iostate/renderer.m:
    Avoid a warning about an unused module in ther interface.

extras/curs/curs.m:
    Delete an unused import.

extras/lex/lex.m:
    Replace state variables that are not updated.
2025-05-25 17:12:01 +10:00
Julien Fischer
f7837e2f94 Fix copyright notices in some Mmakefiles.
extras/*/Mmakefile:
    As above.
2025-05-05 15:50:03 +10:00
Zoltan Somogyi
af23a48a2b Minor style improvements to extras.
extras/gator/gator:
    Update programming style. Fix indentation. Add a vim modeline.

extras/gator/genotype.m:
extras/gator/phenotype.m:
    Fix indentation.

extras/lex/regex.m:
    Replace if-then-else chain with a switch.

extras/base64/base64.m:
extras/cgi/cgi.m:
extras/cgi/form_test.m:
extras/cgi/html.m:
extras/cgi/mercury_www.m:
extras/complex_numbers/complex_numbers.complex.m:
extras/complex_numbers/complex_numbers.complex_float.m:
extras/complex_numbers/complex_numbers.complex_imag.m:
extras/complex_numbers/complex_numbers.float_complex.m:
extras/complex_numbers/complex_numbers.float_imag.m:
extras/complex_numbers/complex_numbers.imag.m:
extras/complex_numbers/complex_numbers.imag_complex.m:
extras/complex_numbers/complex_numbers.imag_float.m:
extras/complex_numbers/complex_numbers.m:
extras/curs/curs.m:
extras/dynamic_linking/dl_test.m:
extras/dynamic_linking/dl_test2.m:
extras/dynamic_linking/hello.m:
extras/error/error.m:
extras/fixed/fixed.m:
extras/fixed/mercury_fixed.m:
extras/java_extras/make_temp.m:
extras/lex/lex.automata.m:
extras/lex/lex.buf.m:
extras/lex/lex.convert_NFA_to_DFA.m:
extras/lex/lex.lexeme.m:
extras/lex/lex.m:
extras/lex/lex.regexp.m:
extras/logged_output/logged_output.m:
extras/logged_output/main.m:
extras/monte/doit.m:
extras/monte/dots.m:
extras/monte/geom.m:
extras/monte/hg.m:
extras/monte/monte.m:
extras/monte/rnd.m:
extras/mopenssl/mopenssl.m:
extras/odbc/mercury_odbc.m:
extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
extras/posix/posix.chdir.m:
extras/posix/posix.closedir.m:
extras/posix/posix.dup.m:
extras/posix/posix.exec.m:
extras/posix/posix.fork.m:
extras/posix/posix.getpid.m:
extras/posix/posix.kill.m:
extras/posix/posix.lseek.m:
extras/posix/posix.m:
extras/posix/posix.mkdir.m:
extras/posix/posix.open.m:
extras/posix/posix.opendir.m:
extras/posix/posix.pipe.m:
extras/posix/posix.read.m:
extras/posix/posix.readdir.m:
extras/posix/posix.realpath.m:
extras/posix/posix.rmdir.m:
extras/posix/posix.select.m:
extras/posix/posix.sleep.m:
extras/posix/posix.socket.m:
extras/posix/posix.stat.m:
extras/posix/posix.strerror.m:
extras/posix/posix.wait.m:
extras/posix/posix.write.m:
extras/quickcheck/qcheck.m:
extras/quickcheck/rnd.m:
extras/quickcheck/test_qcheck.m:
extras/show_ops/show_ops.m:
extras/split_file/split_file.m:
extras/windows_installer_generator/wix.m:
extras/windows_installer_generator/wix_files.m:
extras/windows_installer_generator/wix_gui.m:
extras/windows_installer_generator/wix_installer.m:
extras/windows_installer_generator/wix_util.m:
    Apply tools/stdlines to all these files.
2025-05-05 08:08:50 +10:00
Zoltan Somogyi
89b3e1dca3 Add "ft=make" to the modelines of Mmakefiles.
Add some missing .PHONY markers, and delete a stray .PHONY marker.

Add some missing copyright years.
2025-05-05 07:58:50 +10:00
Zoltan Somogyi
72dbfa74c6 Improve the style of the odbc library.
extras/odbc/odbc.m:
    Fix a warning from the Mercury compiler.

    Stop using higher order insts as modes.

    Use variable names that are consistent between caller and callee.

    The comments in this file came from the days when we used tabs for
    indentation. Reflow multi-line comments and multi-line calls
    to take advantage of the extra space allowed by four-space indentation.

    Delete a misleading comment.

extras/odbc/Mercury.options:
    Specify the same compiler flags for odbc.m as we do for all modules
    in the compiler directory.
2025-04-20 20:44:02 +10:00
Julien Fischer
dc2c470787 Update and fix copyright notices.
*/Mercury.options:
compiler/*.m:
extras/references/c_references.h:
extras/references/samples/max_test.m:
scripts/mprof_merge_runs:
     As above.
2024-12-30 20:17:22 +11:00
Zoltan Somogyi
c148ce54fe Update style in a bunch of Mmakefiles.
Mmake.common.in:
bindist/Mmakefile:
compiler/Mmakefile:
compiler/notes/Mmakefile:
doc/Mmakefile:
extras/align_right/Mmakefile:
extras/base64/Mmakefile:
extras/dynamic_linking/Mmakefile:
extras/error/Mmakefile:
extras/fixed/Mmakefile:
extras/graphics/samples/gears/Mmakefile.MacOSX:
extras/graphics/samples/maze/Mmakefile.MacOSX:
extras/lex/Mmakefile:
extras/monte/Mmakefile:
extras/posix/Mmakefile:
extras/references/Mmakefile:
extras/references/samples/Mmakefile:
extras/split_file/Mmakefile:
library/Mmakefile:
mdbcomp/Mmakefile:
runtime/Mmakefile:
scripts/Mmakefile:
ssdb/Mmakefile:
tests/Mmake.common:
tests/mmc_make/Mmakefile:
trace/Mmakefile:
util/Mmakefile:
    Invoke the sh builtin "test" as "test", not as "[".

    Make some target names more descriptive.

    Fix indentation.
2024-09-17 11:09:18 +02:00
Peter Wang
35e76e41e2 Put .mh files into Mercury/mhs subdirectory.
Put .mh files into a Mercury/mhs subdirectory when --use-subdirs
or --use-grade-subdirs is used.

compiler/file_names.m:
    Replace ext_cur_mh with ext_cur_ngs_max_cur_mh, in the new category
    ext_cur_ngs_max_cur. The new category is similar to that for .mih
    files, except that .mh files are never placed in grade-specific
    subdirectories.

compiler/handle_options.m:
    Add Mercury/mhs subdirs to list of C include directories
    when --use-subdirs or --use-grade-subdirs is in effect.

compiler/write_deps_file.m:
    Add $(mhs_subdir) prefix before %.mh patterns.

    Create a Mercury/mhs -> .. symlink when installing.
    This is required by mmc --make and mmake --use-subdirs.

    Conform to the changes above.

compiler/export.m:
compiler/make.file_names.m:
compiler/make.program_target.m:
compiler/mercury_compile_llds_back_end.m:
compiler/mlds_to_c_file.m:
    Conform to the changes above.

scripts/Mmake.vars.in:
    Define the variable mhs_subdir.

scripts/Mmake.rules:
    Add -I option to find .mh files when --use-subdirs is used.

browser/.mgnuc_copts:
browser/MDB_FLAGS.in:
compiler/.mgnuc_copts:
compiler/COMP_FLAGS.in:
deep_profiler/.mgnuc_copts:
deep_profiler/DEEP_FLAGS.in:
extras/EXTRAS_FLAGS.in:
grade_lib/.mgnuc_copts:
grade_lib/GRADE_LIB_FLAGS.in:
library/.mgnuc_copts:
mdbcomp/.mgnuc_copts:
mdbcomp/MDBCOMP_FLAGS.in:
mfilterjavac/.mgnuc_copts:
mfilterjavac/MFILTERJAVAC_FLAGS.in:
profiler/.mgnuc_copts:
profiler/PROF_FLAGS.in:
slice/.mgnuc_copts:
slice/SLICE_FLAGS.in:
ssdb/.mgnuc_copts:
ssdb/SSDB_FLAGS.in:
tests/.mgnuc_copts.ws:
tests/WS_FLAGS.ws:
trace/.mgnuc_copts:
tools/lmc.in:
    Add -I options to find .mh files when the workspace is built
    with mmake --use-subdirs.

samples/c_interface/standalone_c/Makefile:
    Add option to let the C compiler find the .mh file.

NEWS.md:
    Announce change.

    Delete trailing whitespace.
2024-07-23 17:44:17 +10:00
Zoltan Somogyi
4d602d6ad3 Specify -I search flags in permitted reference order. 2024-07-17 13:48:27 +02:00
Julien Fischer
ea4b27f57f Delete --fullarch.
The internal option --fullarch has been deprecated in favour of --target-arch
since 2014. Delete it and replace any uses with --target-arch.

compiler/options.m:
    As above.

scripts/Mercury.config.in:
scripts/Mercury.config.boostrap.in:
extras/windows_installer_generator/sample/Mercury.config:
    Conform to the above change.
2023-09-07 11:47:38 +10:00
Julien Fischer
ae1a5863a5 Fix usage message for moose.
extras/moose/moose.m:
    Fix copy-and-paste errors.
2023-09-04 01:19:46 +10:00
Zoltan Somogyi
becb725dd4 Bring log4m.m's style up to date. 2023-07-24 12:53:48 +02:00
Julien Fischer
bbd1a9d138 Avoid warnings from MSVC in extras.
extras/odbc/odbc.m:
extras/log4m/log4.m:
    As above.
2023-07-24 15:20:03 +10:00
Zoltan Somogyi
3d756f61cd Put varsets before vars in write_variable.
library/term_io.m:
    Put the varset before the variable, the item to be written out,
    in the various versions of the write_variable operation.
    The new argument order

    - fits in better with the versions of write_term, which also put
      the varset before the item to be written out, and

    - allows the convenient use of fold operations that write out
      several variables.

NEWS.md:
    Announce the change, though only for the versions that existed
    before yesterday :-)

compiler/inst_graph.m:
extras/moose/mercury_syntax.m:
    Conform to the change.
2023-07-04 16:35:01 +02:00
Julien Fischer
13f01c98bd Ignore .obj files.
extras/.gitignore:
samples/.gitignore:
    As above.
2023-07-02 02:41:56 +10:00
Zoltan Somogyi
a5f9cb6851 Reduce differences between interpreter.m versions.
extras/trailed_update/samples/interpreter.m:
samples/interpreter.m:
    We have these two different versions of a pure Prolog interpreter
    as examples of Mercury code. Reduce the number of unneeded points
    of difference between them, by copying the better code at each such point
    to the other file.

tests/debugger/interpreter.m:
    This file is automatically copied from samples/interpreter.m.

tests/debugger/interpreter.exp:
    Expect the changes caused by the update to the source file.
2023-06-22 14:54:59 +02:00
Julien Fischer
c912aa4313 Fix compilation of extras/base64.
extras/base64/base64.m:
    Fix character escaping in a foreign_proc body.
2023-06-20 12:42:26 +10:00
Julien Fischer
1a95515413 Replace calls to obsolete predicates.
extras/moose/mercury_syntax.m:
extras/moose/moose.m:
    As above.
2023-06-20 11:52:32 +10:00
Julien Fischer
39fa7ddb47 Replace calls to obsolete predicates.
extras/cgi/cgi.m:
extras/moose/grammar.m:
    As above.

extras/curs/curs.panel.m:
    Delete an unused import.
2023-06-19 23:12:44 +10:00
Julien Fischer
2a366cf295 Deprecate --no-ansi and --no-ansi-c.
--no-ansi (mgnuc) and --no-ansi-c (mmc) have not actually done anything for
many years now. Deprecate these options and remove their "use" throughout most
of the Mercury system. (The remaining uses are in the Makefiles for the Boehm
GC, which need to be updated separately.)

Also deprecate the internal compiler option --cflags-for-ansi.

compiler/options.m:
    Document that --no-ansi-c is now deprecated.

    Document that the internal option --cflags-for-ansi is now
    deprecated.

compiler/compile_target_code.m:
    Do not pass the ANSI options to the C compiler.

scripts/mgnuc.in:
scripts/mgnuc_file_opts.sh-subr:
    Deprecate the --no-ansi option; delete code that no longer does
    anything useful.

configure.ac:
    Delete the configuration variable CFLAGS_FOR_ANSI; it is only ever
    set to be empty. (The comment talks about --no-ansi doing other things
    in the mgnuc script. It used to also cause some preprocessor macros
    to be defined for compatibility with the system headers on some
    platforms -- that has not been the case since 2013.)

doc/user_guide.texi:
    Document that --no-ansi-c is deprecated.

bytecode/Mmakefile:
compiler/Mercury.options:
library/Mercury.options:
extras/odbc/odbc.m:
runtime/Mmakefile:
scripts/Mercury.config.bootstrap.in:
scripts/Mercury.config.in:
tests/hard_coded/Mercury.options:
tests/valid/Mercury.options:
trace/Mmakefile:
util/Mmakefile:
    Conform to the above change.

NEWS.md:
    Announce the above.
2023-05-31 17:44:26 +10:00
Julien Fischer
6faef40e9e Fix spelling.
extras/moose/check.m:
    As above.
2023-04-03 21:09:24 +10:00
Zoltan Somogyi
9b6390b17e Bring the programming style of extras up to date.
extras/curs/curs.m:
extras/curs/curs.panel.m:
    Make panel a separate submodule of curs, not a nested submodule.

extras/base64/base64.m:
extras/curses/mcurses.basics.m:
extras/curses/mcurses.m:
extras/curses/mcurses.misc.m:
extras/curses/mcurses.user.m:
extras/gator/evolve.m:
extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/gator/tausworthe3.m:
extras/monte/dots.m:
extras/monte/geom.m:
extras/monte/hg.m:
extras/monte/monte.m:
extras/monte/rnd.m:
extras/moose/grammar.m:
extras/moose/moose.m:
extras/mopenssl/mopenssl.m:
extras/net/echo.m:
extras/net/errno.m:
extras/net/getaddrinfo.m:
extras/net/net.m:
extras/net/netdb.m:
extras/net/sockets.m:
extras/net/streams.m:
extras/net/tcp.m:
extras/net/test_lookups.m:
extras/net/types.m:
extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
extras/references/README:
extras/references/reference.m:
extras/references/scoped_update.m:
extras/solver_types/library/any.m:
extras/solver_types/library/any_array.m:
extras/solver_types/library/any_assoc_list.m:
extras/solver_types/library/any_list.m:
extras/solver_types/library/any_map.m:
extras/solver_types/library/any_tree234.m:
extras/solver_types/library/any_util.m:
extras/trail/trail.m:
extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/vqueens.m:
extras/trailed_update/tests/var_test.m:
extras/trailed_update/tr_array.m:
extras/trailed_update/tr_store.m:
extras/trailed_update/trailed_update.m:
extras/trailed_update/unsafe.m:
extras/trailed_update/var.m:
    Bring programming style up to date.
2023-03-30 21:48:10 +11:00
Julien Fischer
b955ef9024 Fix spelling.
extras/lex/regex.m:
    As above.
2023-03-12 14:44:02 +11:00
Julien Fischer
93dba486ec Update programming style in extras/lex.
extras/lex/lex.buf.m:
extras/lex/lex.lexeme.m:
extras/lex/lex.convert_NFA_to_DFA.m:
    As above.
2023-03-12 14:36:49 +11:00
Julien Fischer
7e10820891 Update programming style.
extras/lex/tests/test_regex.m:
    As above.

    Delete an unused function, that the stdlib now provides
    in any case.
2023-03-11 14:34:50 +11:00
Julien Fischer
52fc3915e7 Update extras/references.
extra/references/c_reference.h:
     Replace refernces to the old c_header_code and c_code
     pragmas.
2023-02-25 12:59:54 +11:00
Julien Fischer
9da35ef306 Replace the use '--' as a module qualifier.
Use typed insts.

extras/solver_types/library/*.m:
    As above.
2023-02-14 18:25:59 +11:00
Julien Fischer
b58aab912c Use a typed inst in a spot.
extras/align_right/align_right.m:
    As above.
2023-02-14 18:24:08 +11:00
Julien Fischer
4b28829101 Use typed insts in extras/lex.
extras/lex/lex.automata.m:
extras/lex/lex.buf.m:
extras/lex/lex.lexeme.m:
extras/lex/lex.m:
    As above.
2023-02-14 17:04:26 +11:00
Julien Fischer
a2db163e56 Use a typed inst in spot.
extras/windows_installer_generator/sample/gen_merc_wxs.m:
    As above.
2023-02-14 16:49:09 +11:00
Julien Fischer
c4358adeeb Fix the windows installer generator sample
extras/windows_installer_generator/sample/gen_merc_wxs.m:
    Get this compiling again.

    Add a vim modeline; convert tabs to spaces.
2023-02-14 16:46:51 +11:00
Julien Fischer
df5b302a60 Update more links.
extras/windows_installer_generator/sample/gen_merc_wxs.m:
    As above.

    Delete trailing whitespace.
2023-02-14 16:32:08 +11:00
Julien Fischer
844e8cb9fa Fix my previous commit.
extras/odbc/odbc.m:
    Use the correct link to the tech report.
2023-02-14 16:20:09 +11:00
Julien Fischer
e54727a01b Update a link to the papers page.
extras/odbc/odbc.m:
    As above.
2023-02-14 16:16:44 +11:00
Julien Fischer
41193dc437 Adjust some documentation for the Tcl/Tk binding.
extras/graphics/mercury_tcltk/Mmakefile.MacOSX:
extras/graphics/mercury_tcltk/README:
     As above.
2023-02-13 21:05:09 +11:00
Darren Bane
d2b26c759c Document how to use the Homebrew version of Tcl/Tk. 2023-02-13 21:02:47 +11:00
Darren Bane
7d349d0074 Fix build of extras/net on macOS. 2023-02-10 22:33:36 +11:00
Julien Fischer
500d125f03 Avoid calls to obsolete functions.
extras/lex/regex.m:
    As above.
2023-02-08 22:19:59 +11:00
Julien Fischer
5274170784 Make characters an instance of the uenum typeclass
The recent change to sparse_bitsets broke the lex library in extras.
Specifically, we now now need to make characters an instance of the
uenum typeclass. This diff does so.

library/char.m:
     Add predicates and functions for converting between unsigned integers
     and characters.

     Make characters an instance of the uenum typeclass.

tests/hard_coded/Mmakefile:
tests/hard_coded/char_uint_conv.{m,exp,exp2}:
     Add a test of the above conversions.

NEWS:
     Announce the additions.

extras/lex/lex.m:
     Conform to recent changes.
2022-12-20 20:18:54 +11:00
Julien Fischer
d7a606af4c Update moose to conform to stdlib changes.
extras/moose/check.m:
extras/moose/grammar.m:
extras/moose/mercury_syntax.m:
     As above.
2022-12-14 01:28:34 +11:00
Zoltan Somogyi
0c5fc71ad6 Bring extras/error/error.m up to date. 2022-11-30 18:26:00 +11:00
Zoltan Somogyi
4d15588c8b Address review comments.
NEWS:
    Mention that we do no longer accept : as module name separator.
    Improve wording.

extras/README.md:
    Document the new old_library_modules directory.

library/ops.m:
    Fix wording, and a dangling reference.

samples/calculator2.m:
    Update to use the new ops.m.
2022-11-12 01:36:32 +11:00
Zoltan Somogyi
de75b98b18 Make higher operator priorities bind tighter.
Mercury inherited its original system of operator priorities from Prolog,
because during its initial development, we wanted to be able execute
the Mercury compiler using NU-Prolog and later SICStus Prolog.
That consideration has long been obsolete, and now we may fix the
design error that gifted Prolog with its counter-intuitive system
of operator priorities, in which higher *numerical* operator priorities
mean lower *actual* priorities. This diff does that.

library/ops.m:
    Change the meaning of operator priorities, to make higher numerical
    priorities mean also higher actual priorities.

    This semantic change requires corresponding changes in any other module
    that uses ops.m. To force this change to occur, change the type
    representing priorities from being a synonym for a bare int to being
    a notag wrapper around an uint.

    The old "assoc" type had a misleading name, since it is related to
    associativity but is not itself a representation of associativity.
    Its two function symbols, which used to be just "x" and "y", meant that
    the priority of an argument must be (respectively) greater than,
    or greater than equal to, the priority of the operator. So rename
    x to arg_gt, y to arg_ge, and assoc to arg_prio_gt_or_ge.

    Rename the old adjust_priority_for_assoc predicate to min_priority_for_arg,
    which better expresses its semantics. Turn it into a function, since
    some of its users want it that way, and move its declaration to the
    public part of the interface.

    Add a method named tightest_op_priority to replace the use of 0
    as a priority.

    Rename the max_priority method as the loosest_op_priority method.

    Add a method named universal_priority to replace the use of
    max_priority + 1 as a priority.

    Add a function to return the priority of the comma operator,
    to allow other modules to stop hardcoding it.

    Add operations for comparing priorities and for incrementing/decrementing
    priorities.

    Change the prefix on the names of the predicates that take op_infos
    as inputs from "mercury_op_table_" to "op_infos_", since the old prefix
    was misleading.

    Add a note on an significant old problem with an exported type synonym.

library/mercury_term_parser.m:
    Conform to the changes above.

    Delete unnecessary module qualifiers, since they were just clutter.

    Add "XXX OPS" to note further opportunities for improvement.

library/pprint.m:
    Conform to the changes above.

    Rename a function to avoid ambiguity.

library/pretty_printer.m:
library/stream.string_writer.m:
library/string.to_string.m:
library/term_io.m:
    Conform to the changes above.

library/string.m:
    Add a note on an significant old problem.

NEWS:
    Announce the user-visible changes.

tests/hard_coded/bug383.m:
    Update this test case to use the new system of operator priorities.

tests/hard_coded/term_io_test.{m,inp}:
    Fix white space.

extras/old_library_modules/old_mercury_term_parser.m:
extras/old_library_modules/old_ops.m:
    The old contents of the mercury_term_parser and ops modules,
    in case anyone wants to continue using them instead of updating
    their code to use their updated equivalents.

samples/calculator2.m:
    Import the old versions of mercury_term_parser and ops.
2022-11-11 00:11:44 +11:00
Zoltan Somogyi
a2f89cb891 Give some predicates better names.
extras/xml/parsing.m:
    As above.

extras/xml/xml.parse.m:
extras/xml/xml.parse.chars.m:
    Conform to the change in parsing.m.
2022-06-25 06:45:51 +10:00
Zoltan Somogyi
ce14206488 Clean up several aspects of extras/xml.
extras/xml/parsing.m:
extras/xml/unicode.m:
extras/xml/xml.cat.m:
extras/xml/xml.doc.m:
extras/xml/xml.dtd.m:
extras/xml/xml.encoding.m:
extras/xml/xml.m:
extras/xml/xml.ns.m:
extras/xml/xml.parse.chars.m:
extras/xml/xml.parse.m:
    Use predmode declarations when possible.

    Flatten camelCase.

    Add prefixes to the names of function symbols and fields
    if this avoid ambiguity, either with other parts of this code,
    or with standard Mercury function symbols or predicates.

    Replace uses of graphic characters such as ',' and '-' as
    general purpose function symbols with normal, alphanumeric
    function symbols. (Uses of graphic characters to stand for themselves
    in xml.parse.chars.m are unaffected.)

    Replace uses of graphic symbols such as ',' '->' and '[|]' as type names.

    Improve some other names as well.

    Convert (C->T;E) to (if C then T else E).

    Replace tabs with spaces.

    Delete unused imports.

    Make the order of definitions match the order of declarations.

extras/xml/tryit.m:
    Put the code for handling a single command line argument into its own
    predicate.

    Replace see/seen with read_named_file_as_string.

    Avoid using !IO to pass around the parser state.

    Instead of writing out the parse tree as a single very long line,
    convert both the DTD and the HTML code to a prettyprinter doc,
    and print that. This makes the output actually readable, and
    also makes it usefully diffable as well.

extras/xml/Mmakefile:
    Replace the old do-nothing check action with one that actually does
    check whether the code in this directory can do at least one simple task,
    the one mentioned in in samples/README. It would be nice of we had
    more tests, more extensive tests, or (preferably) both, but that would
    require someone who knows the code significantly better than I do.

    Add a rule for making the tags file.

    Compile the modules in this directory with the same default mmc flags
    as we use in the compiler directory.

extras/xml/XML_FLAGS:
    The default flags for modules in this directory.

extras/xml/Mercury.options:
    The non-default flags for modules in this directory.

extras/xml/samples/newsarticles.exp:
    The expected output of running the updated tryit program on the
    (just one) sample input in this directory.

extras/xml/README:
extras/xml/samples/README:
    Replace some obsolete references, and improve formatting.
2022-06-24 07:26:55 +10:00
Peter Wang
3124fcfc06 Attribute memory allocations in mercury_cairo.
extras/graphics/mercury_cairo/*.m:
    As above.
2022-05-20 14:36:02 +10:00
Julien Fischer
8ef9073be2 Delete remaining references to --use-trail-segments.
doc/user_guide.texi:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/Mmakefile:
samples/solver_types/Mercury.options:
scripts/init_grade_options.sh-subr:
    As above.

RELEASE_NOTES_NEXT:
    Delete item concerning the above.
2022-04-18 21:45:15 +10:00