Thursday, December 27, 2007

Installation Instructions

Instructions for Quicksilver

  1. Decompress the archive in a directory of your choice

  2. Modify the script mmc in directory
    so that the MERCURY_COMPILER variable points to
    and so that the MERCURY_CONFIG_DIR variable points to

  3. Export the following environmental variables with the following

    MERCURY_HOME $dir/quicksilver-0.12.2.powerpc-apple-darwin8.3

  4. Add the following paths to your DYLD_LIBRARY_PATH
    environmental variable:



  5. Add the following path to your PATH environmental

  6. Add the following path to your MANPATH environmental

  7. You should be able to do the following with the file

    $ mmc --make hello
    $ ./hello

  8. Since this compiler allows op/3 declarations,
    the following module, play.m,
    demonstrates this capability. I intentionally left out some
    declarations, so compiliation is slightly different:

    $ mmc --infer-all --make play
    $ ./play

Creating syntax with op/3 can become complicated
when several operators interact to create a term. I've provided a
module that prints the canonical representation of a parsed term
(write_canonical.m) and a testing
module (test_op.m) that allows prototyping
of operator declarations and allows submitting terms under that
syntax. The whole test system may be built in the usual way:

$ mmake test_op.depend
$ mmake test_op

Copyright © 2006, Logical Types, LLC. All rights reserved.

No comments:

Post a Comment