mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
Estimated hours taken: 2 Branches: main Add appropriate infrastructure to support doing `mmake depend && mmake && mmake install' in the `extras' directory, and having it automatically install and build as much as possible. extras/Mmakefile: New file. extras/cgi/Mmakefile: Delete bogus reference to `ALL_LIBGRADES' and `mercury-config'. extras/complex_numbers/Mmakefile: extras/concurrency/Mmakefile: extras/concurrency/concurrency.m: extras/curses/Mmakefile: extras/dynamic_linking/Mmakefile: extras/lazy_evaluation/Mmakefile: extras/lex/Mmakefile: extras/moose/Mmakefile: extras/xml/Mmakefile: Add rules for `mmake install'. extras/references/scoped_update.m: Add macro guard around typedef in `c_header_code'. extras/curs/Mmakefile: extras/curses/Mmakefile: Define MERCURY_BOOTSTRAP_H, to avoid name clash on `bool' that is caused by our bootstrap code in runtime/Merucry.h. extras/curs/curs.m: Add `promise_pure' declarations for all pure procedures. XXX Should this be needed? These predicates all take io__state arguments.
This directory contains two impure reference type modules, and a module that allows scoped non-backtrackable update, plus two example modules using these types. These serve as an example of impure coding. Generally this sort of coding is not necessary, and it can be quite tedious and error-prone, but occasionally it may permit greater efficiency than using pure Mercury code, or may permit you to write in Mercury what you would otherwise have to write in C. See the "Impurity declarations" chapter of the Mercury Language Reference Manual for more information on impurity. This directory contains reference.m a backtrackable reference types nb_reference.m a non-backtrackable reference types scoped_update.m scoping for non-backtrackable updates global.m a wrapper module used for building a library containing the above modules c_reference.h C types used to implement the reference types The samples directory contains max_of.m an example of non-backtrackable references test_max.m test case for max_of.m The tests directory contains ref_test.m tests of reference.m, nb_reference.m and scoped_update.m glob_test.m tests use of c_reference.h to implement global variables