Zoltan Somogyi 35a4f3a2dd Fix some error messages for malformed pragmas.
compiler/parse_pragma.m:
    Improve error handling in several respects.

    First, for several kinds of pragmas the only error message we printed
    was some form of "something went wrong". Fix this by generating messages
    that say what part of the pragma has a problem, and what that problem is.

    Second, specify the "where" part more precisely, as a nested context
    (in construct A: in construct B: etc).

    Third, make the text of error messages more consistent, using patterns
    such as "expected abc, got def", and "In the Nth argument of xyz:".

    Fourth, don't stop looking for errors after finding one; keep looking
    for others.

    Also, replace a bunch of if-then-elses with switches, and break up
    a too-large predicate.

compiler/parse_sym_name.m:
    Add parse_sym_name_and_no_args, a version of the existing predicate
    try_parse_sym_name_and_no_args that generates an error message if it
    does not find what it is asked to look for.

    Use the same consistent error message phraseology as above (which we
    also use elsewhere in the compiler).

compiler/parse_item.m:
    Put a newline at the end of context pieces such as "In clause head:",
    so that the "error:" that follows is not buried in the middle of a line.

tests/invalid/bad_pragma.{m,err_exp}:
    Add a news test case for some of the updated error messages.

tests/invalid/Mmakefile:
    Enable the new test case.

tests/invalid/bad_foreign_enum.m:
    Add another bad foreign_enum to this test.

tests/invalid/bad_detism_category.err_exp:
tests/invalid/bad_foreign_code.err_exp:
tests/invalid/bad_foreign_enum.err_exp:
tests/invalid/bad_foreign_export.err_exp:
tests/invalid/bad_foreign_export_enum.err_exp:
tests/invalid/bad_foreign_import_module.err_exp:
tests/invalid/bad_foreign_proc.err_exp:
tests/invalid/bad_foreign_type.err_exp:
tests/invalid/bad_with_inst.err_exp:
tests/invalid/impl_def_literal_syntax.err_exp:
tests/invalid/invalid_float_literal.err_exp:
tests/invalid/null_char.err_exp:
tests/invalid/predmode.err_exp:
tests/invalid/require_tailrec_invalid.err_exp:
tests/invalid/some.err_exp:
tests/invalid/specified.err_exp:
tests/invalid/vars_in_wrong_places.err_exp:
    Expect the updated error messages.
2020-08-23 10:29:34 +10:00
2020-06-28 16:14:10 +10:00
2020-08-11 05:43:16 +10:00
2020-08-20 01:03:52 +10:00
2020-08-11 05:43:16 +10:00
2020-08-09 20:31:46 +10:00
2020-03-06 09:20:36 +11:00
2020-01-22 13:13:18 +11:00
2020-01-22 13:13:18 +11:00
2020-06-02 16:23:22 +10:00
2020-01-01 16:19:51 +11:00
2020-04-14 21:26:30 +10:00
2020-04-13 05:54:09 +10:00
2020-04-18 14:48:55 +10:00
2020-08-19 21:51:05 +10:00
2020-01-22 13:13:18 +11:00
2020-01-22 13:13:18 +11:00
2020-06-27 22:19:42 +10:00
2020-01-24 17:40:22 +11:00
2020-06-02 16:23:22 +10:00

Mercury

Mercury is a logic/functional programming language which combines the clarity and the expressiveness of declarative programming with advanced static analysis and error detection features.

More information is available on the website's about pages, in other README files in the source code repository, and in the documentation.

README files

The Mercury compiler has a number of different backends and works on different operating systems. Specific information is contained in individual README files:

Other information

See the current release notes for the latest stable release. The history file is relevant if you want to find out more about the past development of Mercury. News lists any current or future enhancements (but this isn't always up-to-date). The limitations file lists a number of ways in which the Mercury implementation does not yet meet its goals.

Information for developers

If you are considering contributing to the Mercury project the website contains some documents that may be helpful. These include a document about contributions in general and specific information about contributing such as coding styles.

Contact

See our contact page.

Description
No description provided
Readme MIT 145 MiB
Languages
Mercury 85.4%
C 8.7%
Shell 1.4%
Makefile 1%
JavaScript 1%
Other 2%