ML
can be used in conjunction with the Nuprl
system in a variety of
ways. The easiest way to invoke ML is to give the
command ml in the
command window;
this invokes an interactive ML
interpreter.
Expressions for evaluation are typed at the
M> prompt
and ended with ;; followed by a carriage return.
Figure illustrates some examples
of using ML from the Nuprl
command window. The user's input is on lines
indicated with M>, while the system responds on the line below with the
value of the expression (except when the expression is a function) and the
type of the expression. Note how a polymorphic expression is typed in the
third example.
Another way to invoke ML is to use the create command to create an object of ML type as in the following example.
create m1 ml topOne can then invoke the text editor on the object using the view command. The body of an ML program can be written, and the result can be checked using the check command in the Nuprl command window. This process is illustrated in figure
Figure: Examples of ML Expressions with Their Inferred Types
Figure: Using the Text Editor to Write ML Programs