Using OCaml compilers for this course

The programming assignments in P505 will use the Caml dialect of ML. (Objective Caml, or OCaml for short, is the implementation of Caml.) You may use any remotely recent version of OCaml (nothing we do should depend on a particular version). Do not use F# (a Microsoft dialect of Caml), just because it is too difficult for the course staff to provide and grade code in two dialects/platforms. The differences between Caml and F# are minimal from P505's perspective, so we just picked one.

We recommend a research prototype called SEMINAL developed by Ben Lerner here at UW. SEMINAL differs from OCaml only in how it presents error messages from the type-checker. We believe it is better than the conventional approach, encourage you to use it, and would appreciate any feedback or suggestions.

Installation

Installing SEMINAL

SEMINAL is available on the department's instructional Linux server attu in /cse/courses/csep505/09wi/bin/. To use it by default, add /cse/courses/csep505/09wi/bin/ to the head of your $PATH, or alias ocamlc to /cse/courses/csep505/09wi/bin/ocamlc. If you have questions about using SEMINAL or want to install SEMINAL on your own machine, you can contact its developer Ben Lerner (blerner@cs). The course staff can also help with basic questions.

See below for usage instructions for SEMINAL; in particular if you do not use the -seminal command-line flag, you will not see any difference over the standard OCaml error messages.

SEMINAL does not have a special version of the read/eval/print loop (i.e., ocaml instead of ocamlc). There is a /cse/courses/csep505/09wi/bin/ocaml, but you cannot give it the -seminal option and you will not get SEMINAL-style error messages from it. However, there is no problem using both ocaml and the SEMINAL ocamlc.

Installing Standard OCaml at UW

If you do not wish to use SEMINAL, you are free to use the standard OCaml compiler.

Running OCaml:

In general, you can use ocaml to experiment on the fly, and ocamlc to compile an entire file at once. To exit ocaml's read-eval-print loop, either use Ctrl+D (only works on Linux boxes), or "exit 0;;" (which works anywhere).

For further information, see part III of the system manual: http://caml.inria.fr/pub/docs/manual-ocaml/index.html

Running SEMINAL:

Note each of the three approaches may give you complementary information that can help you diagnose your type error. Bug reports and/or particularly interesting success stories are appreciated.