mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 01:13:30 +00:00
Estimated hours taken: 1 Branches: main, release Prepare for the 0.13 release and fix/update documentation. NEWS: HISTORY: Update the NEWS and HISTORY files for the 0.13 release. RELEASE_NOTES: s/0.12/0.13/ Add Linux/x86_64 to the list of architectures supported by this release. Remove Solaris 8/x86 from the same list. .README.in: extras/README: Remove references to the clp(r) binding. We no longer support it. bindist/bindist.README: Update the year in the copyright message. Fix the gc version; 0.13 uses 6.5. BUGS: README.DotNet: README.Java: README.gcc-backend: doc/faq.texi: doc/make_manpage: doc/mercury.html.in: doc/mercury.info.in: s/.cs.mu.oz.au/.csse.unimelb.edu.au/ library/array.m: library/builtin.m: library/eqvclass.m: library/graph.m: samples/README: Fix typos.
66 lines
2.3 KiB
Plaintext
66 lines
2.3 KiB
Plaintext
|
|
This directory contains some example Mercury programs.
|
|
|
|
hello.m "Hello World" in Mercury.
|
|
|
|
cat.m An implementation of a simple version of the
|
|
standard UNIX filter `cat', which just copies
|
|
its input files or the standard input stream to
|
|
the standard output stream.
|
|
|
|
sort.m An implementation of a simple version of the
|
|
standard UNIX filter `sort', which reads lines
|
|
from its input files or the standard input
|
|
stream, sorts them, and then writes the result
|
|
to the standard output stream.
|
|
|
|
calculator.m A simple four-function arithmetic calculator,
|
|
with a parser written using the Definite Clause
|
|
Grammar notation.
|
|
|
|
calculator2.m A simple four-function arithmetic calculator,
|
|
which uses the parser module in the standard
|
|
library with a user-defined operator precedence
|
|
table.
|
|
|
|
committed_choice.m An example illustrating committed-choice
|
|
nondeterminism in Mercury.
|
|
|
|
interpreter.m An simple interpreter for definite logic programs.
|
|
A demonstration of meta-programming in Mercury.
|
|
|
|
expand_terms.m Another example meta-program, showing how to
|
|
emulate Prolog's `expand_term' mechanism.
|
|
|
|
e.m A small program which calculates the base of
|
|
natural logarithms to however many digits you
|
|
choose. It illustrates one way to achieve
|
|
lazy evaluation in Mercury.
|
|
|
|
Mmakefile The file used by `mmake', the Mercury Make program,
|
|
to build the programs in this directory.
|
|
|
|
The `solutions' sub-directory contains some examples of the use of
|
|
nondeterminism, showing how a Mercury program can compute
|
|
- one solution,
|
|
- all solutions, or
|
|
- some solutions (determined by a user-specified criteria)
|
|
for a query which has more than one logically correct answer.
|
|
|
|
There are also some sub-directories which contain examples of multi-module
|
|
Mercury programs:
|
|
|
|
diff This directory contains an implementation of a
|
|
simple version of the standard UNIX utility
|
|
`diff', which prints the differences between
|
|
two files.
|
|
|
|
c_interface This directory contains some examples of mixed
|
|
Mercury/C/C++/Fortran programs using the C interface.
|
|
|
|
rot13 This directory contains a few implementations of
|
|
rot-13 encoding.
|
|
|
|
muz This directory contains a syntax checker / type checker
|
|
for the specification language Z.
|