
4.3.2 Describing the location of a program unit on the file system
Shell.Build uses a portable notation that is deliberately reminiscent of the qualified name notation used to describe items in ML structures and signatures. In this notation, directories on the file system are considered to be compounds containing a collection of units.
The location of a unit is described analogously to a standard file pathname. A string that contains a sequence of compound names separated by a dot (.) and is terminated by the unit name describes the location of that unit.
For example, the string "foo.bar.baz" would, to a Shell.Build function, mean a unit baz in the subcompound bar of compound foo. The function would supply a .sml (source code) or .mo (object code) suffix as appropriate.
MLWorks searches for units on the source path (see structure Path); to find a unit specified as a member of a compound structure (such as baz, above), MLWorks looks in turn at each directory on the source path, and attempts to match to their subdirectories to the compound structure given.
Thus on a UNIX system where the source path consists of a single element "/mlworks/", the string "foo.bar.baz" would map to /mlworks/foo/bar/baz.x only if there existed a file /mlworks/foo/bar/baz.x.
In addition to the dot separator, the abstract notation reserves two further special symbols. These symbols can be used in place of a literal compound name:
^
$
$ symbol refers to the particular root compound associated with the file that mentions it in a require.

Generated with Harlequin WebMaker