HMC Homepage      CS Home

Running SML on Turing

Starting SML

To run SML from the command line, type

  • %sml

Note: CS80 (and perhaps other classes as well) uses an augmented version of SML that includes definitions that are used for the assignments. To run this, type

  • %/cs/cs80/sml/sml-CS80
The information given out in class will likely be more up-to-date then this and will be a more reliable reference. If you happen to notice this being out of date or know of other class specific information that might be useful here, please email consult@turing.cs.hmc.edu so we can fix this.

If you want to be able to run this by simply typing sml-cs80, then add /cs/cs80/sml to your path by doing the following:

  1. Add the line

    set path=($path /cs/cs80/sml)

    to the .cshrc file in your home directory.

  2. Save and exit.

  3. type

    %source .cshrc

    at the command line to load it (assuming you're in your home directory.) In the future it will load automatically.

Loading Files

To load a file from the SML prompt (or from within another file) type
  • use "filename";
The quotes are required.

Quitting SML

  • Hit [ctrl]-d

Using SML Mode in Emacs

To make sure emacs loads SML mode:
  • Add

    ;;;SML mode -- The setup file supplied by CS80
    (load "/cs/cs80/sml/sml-mode/sml-mode-setup-cs80")

    or

    ;;;SML mode -- The setup file supplied by CS131
    (load "/cs/cs131/sml-mode/sml-mode-setup")

    to the .emacs file in your home directory, depending on whether you want the CS80 or the CS131 setup file.

Information on using sml-mode can be found at /mnt/web/www/courses/2000/spring/cs131/emacsmodeforsmlnj.html.

For More Information

The CS131 home page also contains resources
www.cs.hmc.edu/cs131 including a list of common pitfalls for new SML users by our own Chris Stone, and a great SML tutorial by Robert Harper at Carnegie Mellon.

HMC Computer Science Department
Contact Information
Last Modified Monday, 27-Jan-2003 15:45:32 PST