Next Previous Up Top Contents Index

1 Using MLWorks interactively

1.12 The MLWorks start-up file

When MLWorks starts up, it looks for a file called .mlworks in your home directory, and if this exists, evaluates its contents as ML declarations and modifies the context accordingly. You could use this file to pre-load libraries, for instance, so that you do not need to load them by hand at the beginning of each session.

MLWorks will print the result of evaluating the contents of the file at the command line where it was invoked:

$ mlworks
Use: .mlworks
val twice : int -> int = fn

Here, the .mlworks file defines a function twice:

fun twice n = 2 * n;


MLWorks User Guide version 2.0 for UNIX/Linux - 31 Jul 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker