SML/NJ Library Manual

The LibBase structure


signature LIB_BASE
structure LibBase : LIB_BASE

The LibBase structure provides a set of common types, exceptions, and utility functions for the library. Although defined and used within the library, the components of LibBase are meant to be used by program built on top of the library. For example, most code has need of an Unimplemented exception to flag code yet to be written, or an Impossible exception, to mark cases that should not occur.


exception Unimplemented of string
exception Impossible of string
exception NotFound
val failure : {module : string, func : string, msg : string} -> 'a
val version : {date : string, system : string, version_id : int list}
val banner : string


exception Unimplemented
Raised to report unimplemented features.

exception Impossible
Raised to report internal errors.

exception NotFound
Raised to indicate various search failures.

failure {module, func, msg}
raises the exception Fail with a standard message format. By convention, func and module should be the names of the function and structure, respectively, in which the failure occurs. The msg string should provide additional information as to the cause or location of the problem.

is a record providing information about the library version in a conventional format. The system field specifies the subsystem involved, in this case the SML/NJ library; the date field gives the date of the release; the version_id field provides a list of integers indicating the major and various minor release numbers associated with the current release. The closer to the head of the list, the more significant is the release number; in particular, the head of version_id is the major release number.

encodes the information in version as a string, e.g., "SMLNJ Library, Version 1.0, June 1, 1996".

[ Top | Parent | Contents | Index | Root ]

Last Modified May 6, 1998
Comments to John Reppy
Copyright © 1998 Bell Labs, Lucent Technologies