		    Standard ML of New Jersey
			   Version 109
			 January 19, 1996

	 ------------------------------------------------

STANDARD ML OF NEW JERSEY COPYRIGHT NOTICE, LICENSE AND DISCLAIMER.

Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995 by AT&T Bell Laboratories.
Copyright 1996 by Bell Laboratories.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both the copyright notice and this permission notice and warranty
disclaimer appear in supporting documentation, and that the name of
AT&T Bell Laboratories or any AT&T entity not be used in advertising
or publicity pertaining to distribution of the software without
specific, written prior permission.

AT&T disclaims all warranties with regard to this software, including
all implied warranties of merchantability and fitness.  In no event
shall AT&T be liable for any special, indirect or consequential
damages or any damages whatsoever resulting from loss of use, data or
profits, whether in an action of contract, negligence or other
tortious action, arising out of or in connection with the use or
performance of this software.

	------------------------------------------------

Version 109 of Standard ML of New Jersey (SML/NJ) is an internal working
version that is probably stable enough for use by brave souls.  The
transition from Version 93 to the next general release involves a complete
reworking of almost the entire system.  Version 109 is perhaps 90% of the
way there, but there are still changes to come.  Also, users should be
aware that there may be further changes in some of the new interfaces before
the next general release.

This version works on the following machine/OS combinations:

  Alpha; OSF/1 (V 2.0 or later; does not work under V 1.3)
  HPPA; HPUX 9.x (requires gcc; may work under 10.x, but we haven't tested it)
  MIPS; Irix 4.x
  MIPS; Irix 5.x
  RS/6000; AIX 3.x and AIX 4.x
  SPARC; SunOs 4.x
  SPARC; Solarix 2.x
  x86; Linux
  x86; Solaris 2.x (thanks to Mikael Pettersson)

Here is a list of the files in the distribution.  Note that, unlike in previous
versions, you do not need the compiler source (109-sml-nj.tar.Z) to install
the system.

  109-README			This file
  109-INSTALL			Installation instructions
  109-doc.tar.Z			Misc. documentation.
  109-config.tar.Z		Configuration/installation scripts (REQUIRED)
  109-runtime.tar.Z		Run-time system source (REQUIRED)
  109-sml-nj.tar.Z		Source for compiler (optional)
  109-cm.tar.Z			CM source
  109-ml-yacc.tar.Z		ML-Yacc source
  109-ml-lex.tar.Z		ML-Lex source
  109-ml-burg.tar.Z		ML-Burg source
  109-smlnj-lib.tar.Z		SML/NJ Library source
				Compiler binaries for specific architectures:
  109-bin.alpha32.tar.Z		  Alpha binaries
  109-bin.hppa.tar.Z		  HPPA binaries
  109-bin.mipseb.tar.Z		  Big-endian MIPS binaries
  109-bin.rs6000.tar.Z		  RS/6000 binaries
  109-bin.sparc.tar.Z		  Sparc binaries
  109-bin.x86.tar.Z		  Intel x86 binaries.

KNOWN BUGS
In addition to reported open bugs, version 109 suffers from the following
problems:

  - virtual memory usage can be significantly higher than in 0.93, although
    physical memory usage and garbage collection overhead is down.

  - there is only partial documentation (what little there is can be
    found in the doc directory).

  - stopping sml using ^Z and then restarting it causes sml to lose contact
    with the terminal input stream under Irix 4.0.5.  This doesn't appear to
    be a problem with Irix 5.x.

CHANGES FROM 108 to 109
There have been many changes in the SML/NJ API since 108.  Most of these changes
are related to moving towards the new Standard ML Standard Library (SMLSL).  We
expect to make a draft of the SMLSL Manual available on the WWW in early
February 1996; this will be announced on the comp.lang.ml newsgroup.

Here is a list of the more significant changes (in no particular order):

  - We have implemented a first pass at the SMLSL I/O interfaces.  There are
    two structures: TextIO and BinIO that implement text and binary I/O
    stacks.  There are three levels to an I/O stack: the imperative level,
    which supports dynamic binding of I/O streams; the stream level, which
    supports a functional style of input; and a primitive I/O level, which
    supports unbuffered I/O.  There is also an IO structure that is mostly
    compatible with the 0.93 IO structure.  This structure will move into
    a compatibility library by version 110.

  - The IO structure no longer supports execute_in_env and execute.  These are
    Unix specific operations and don't belong in an OS independent module.
    There is now a Unix structure that supports a somewhat more sophisticated
    version of these operations; in addition, the Posix structure provides full
    access to the IEEE Std. 1003.1b POSIX API.

  - The exportFn operation now has a new type:

	val exportFn : (string * ((string * string list) -> OS.Process.status)) -> 'a

    As before, the first argument is the name of the file to export the heap image
    to, and the second is the function to be exported.  The type of the exported
    function has changed:  its first argument is argv[0] (i.e., the command
    name), and the string list is the list of command-line arguments.
    To get access to the environment, use OS.Process.getEnv, or
    Posix.ProEnv.environ.

  - The Array and Vector (and monomorphic versions) now provide a collection of
    iteration operations (e.g., app, foldl, ...).  Note that opening both the
    Array and List structure will result in the iterators from the first
    structure opened to be masked by the second.

  - The functions Array.arrayoflist and Vector.vector have been renamed
    Array.fromList and Vector.fromList.  There is a top-level function
    vector that is bound to Vector.fromList.

  - The Integer structure has been renamed Int.

  - There is full support for unsigned integers (called words in the SMLSL).
    SML/NJ supports three sizes: 8-bit (structures Word8, Word8Vector, and
    Word8Array), 31-bit (structure Word31 (aka Word)), and 32-bit (structure
    Word32).  Word literals are overloaded over the various sizes (they default
    to Word.word).  The syntax of a word literal is: 0wddd (decimal) and
    0wxddd (hexadecimal).  For example: 0w1, 0wxFF, 0w128.

  - The Bits and ByteArray no longer exist.  Use words for bit operations and
    Word8Array/Word8Vector for sequences of bytes.

  - The Pack{16,32}{Big,Little} structures provide support for the packing/unpacking
    of word values from Word8.word arrays and vectors.

  - There is a Date structure that provides conversions between time values and
    dates.  This is a partial implementation of the SMLSL interface.

  - The SML/NJ Library has been overhauled to better conform to the SMLSL.  In this
    first pass, we mostly eliminated redundant modules.  We expect that for version
    110 we will update some of the interfaces to follow the naming conventions
    of the SMLSL.  Here is a summary of the Library changes:

      - The ListUtil structure has been deleted: most of its operations can be
	found in the List and ListPair structures of the SMLSL.

      - The StringUtil structure has been deleted: most of its operations can be
	found in the String, Substring, and Char structures of the SMLSL.

      - The StringCvt structure has been deleted: conversions from strings can
	be found in the various structures (e.g., Int.fromString, Bool.fromString).

      - The MakeString structure has been deleted: conversions to strings can
	be found in the various structures (e.g., Int.toString, Bool.toString).

      - The Path structure has been deleted: use the OS.Path structure instead.

      - The CType structure has been deleted: use the operations in the Char
	structure instead.

  - Version 109 does not support CML or eXene (108.5 was the last version to
    do so).  A new implementation of CML is currently being tested; it should
    be available by March.  Once the new version of CML is stable, we expect to
    have eXene ported fairly quickly.

  - The General.union datatype was eliminated.

  - The structure System.Signals has been replaced by a pair of new top-level
    structures: Signals and UnixSignals.  The interface of the Signals structure
    is also different.
    Warning: it is likely that this interface will continue to evolve.



CHANGES FROM 107 to 108
There were substantial changes in many aspects of the system.  Many of these
changes have to do with the migration towards a new standard basis for SML
(this basis will be supported by at least two other SML implementations).
Note that while we believe those parts of the new basis that we have
implemented to be fairly stable, it is quite possible that there may be
further minor changes.

The following structures have been deleted or significantly changed:

  General		changed to conform with the new basis.
  List			this has been changed to conform to the new basis
  System.CleanUp	interface and implementation have changed
  System.Control	various flags eliminated (e.g., gcmessages)
  System.Directory	deleted
  System.Timer		deleted
  System.Unsafe.SysIO	many functions deleted (moved to Posix.IO).

The following structures have been added:

  ListPair
  OS
    OS.FileSys, OS.Path, OS.Process
  Posix
    Posix.Error, Posix.FileSys, Posix.IO,
    Posix.ProcEnv, Posix.Process, Posix.Signal,
    Posix.SysDB
  Substring
  Time
  Timer

These, and other changes, are described in more detail below:

  - We have switched from using SC to CM for separate compilation.  CM is
    both faster and significantly more robust than SC.  CM is required to
    install and used the libraries that are included in the distribution.
    There is a user's manual for CM in the doc directory.

  - The General structure has been modified to conform with the standard
    basis.  These changes include the elimination of the inc and dec
    functions (which were also available at top-level).

  - The old List structure has been replaced with one conforming to the new
    basis.  Here is a summary of the changes:

      * the functions List.nth and List.exists are no longer at top-level

      * the function List.app requires its first argument to return unit.

      * the functions List.fold and List.revfold have been replaced by
	List.foldr and List.foldl.  Furthermore, they have the type:

	  (('a * 'b) -> 'b) -> 'b -> 'a list -> 'b

	I.e., the second and third arguments are swapped.

      * There is a function List.concat, which implements the common idiom:

	  fold (op @) l []

      * The exception Nth no longer exists.  The function List.nth raises the
	General.Subscript exception.

      * The opening of the List structure causes the top-level binding of
	String.concat to be masked, which may introduce type errors.

  - There are new basis structures Time and Timer, which support access to
    the current time of day, and to system timing.  The time type is now abstract.
    The structure System.Timer does

  - The new OS structure provides generic support for operating system
    operations.  Programs written using this interface should work on
    UNIX, WindowsNT, Window95, and MacOS implementations of SML.  The
    structure OS.FileSys provides operations on the file system (these
    replace the old System.Directory structure); the structure OS.Path
    provides pathname manipulation; and the structure OS.Process provides
    simple process management.

  - The new standard basis specifies a POSIX 1003.1a binding for SML/NJ.  This
    has mostly been implemented (the Posix.Tty structure is missing).  Many of
    the UNIX functions in System.Unsafe.SysIO and System.Unix have been
    superseded by their POSIX equivalents.

  - The new ListPair structure supports operations on pairs of lists.

  - The new Substring structure supports various string searching and
    manipulation operations.  Also, the Char and String structures have
    been enriched.

  - The function System.exn_name has moved to SMLofNJ.exnName.

  - The function System.system has been deleted; use OS.Process.system instead.


CHANGES FROM 106 to 107
Most of the changes are compiler improvements and bug fixes.  Most of the
visible changes have to do with a reorganization of the ML callable C code.

  - eXene has been ported to 107, and a snapshot is included in the release.
    This is very much a working version, but there is some high-level
    documentation in eXene/README.

  - the function System.Unsafe.CInterface.c_string has been deleted (ML strings
    are always NULL terminated in 107).  Also, the type of c_function has changed.

  - the function System.Unsafe.CInterface.syscall has been eliminated.

  - the implementation of System.Directory.getWD has been fixed.  We now use
    the POSIX getcwd() to implement this.

  - The ML callable C library in the run-time has been split into a collection
    of libraries, which are organized by related function.  This organization
    should make it somewhat easier to add C code to the system.  See the file
    notes/HOWTO-ADD-C-CODE for more information.


CHANGES FROM 103 to 106
The last working version that was made available via ftp was 103; here is
a list of the major changes since then:

  - Version 106 uses a new run-time system with a multi-generational
    collector.  This affects users and installers of the system in
    several significant ways:

      - The new run-time separates the run-time executable from the
	ML heap images.  This means that an application (e.g., sml-sc)
	consists of a run-time system and a heap image.  The run-time
	executables depend on the architecture and OS, while the heap
	image depends on the application and architecture.  There is a
	standard driver shell script that gets created as part of the
	installation process (see the 106-INSTALL file for details).
	The "exportML" and "exportFn" commands generate heap images.

      - The new collector tends to use more virtual memory than the
        old collector, but less physical memory.  The virtual memory
        performance will be improved before the next release, but you
        may have trouble running this on machines with small swap spaces.

  - Version 106 supports characters as a first class type.  Character
    literals are written as length one strings preceeded by "#" (e.g.,
    #"a", #" ", #"\"", #"\128").  The structure Char defines various
    operations on characters.  As a result of this change, the signature
    of the String structure has changed.  In particular, the functions
    String.length, String.ord and String.ordof no longer exist, and the
    functions implode and explode have different types.  The old versions
    can be defined roughly as follows:

      val length = String.size
      val ordof = Char.ord o String.sub
      fun ord s = ordof(s, 0)
      val explode = (map Char.ord) o String.explode
      val implode = String.implode o (map Char.chr)

    The Ord exception is no longer raised, instead Subscript is raised.
    Also, the Chr exception has been moved to the Char structure.

  - As a result of the changes to the String and the addition of the Char
    structure, ML-Lex, ML-Yacc, the SML/NJ Library, and CML have been changed.
    In the case of ML-Lex and ML-Yacc, you will have to regenerate your
    parsers/scanners using the new version, if you want to use 106.  There
    were significant changes to some of the interfaces in the SML/NJ library
    (e.g., CType, CharSet), but the changes to CML are all internal.  We
    haven't ported eXene to 106 yet, but that will be done soon.

  - Version 106 has a different signature for the Array and Vector structures.
    The exceptions Subscript and Size have been moved to the General
    structure.

  - Version 106 has generic monomorphic array and vector signatures (MONO_ARRAY
    and MONO_VECTOR).  Currently, the only implementation of these are the
    CharVector and CharArray types, but the RealArray structure will be
    switched over soon.  The type CharVector.vector is the same as String.string.

  - Versions are now numbered as integers (i.e., 106 instead of 1.06).  The
    signature of Compiler.Version has changed.

  - The get_fd_out function was removed from the IO signature.

CHANGES FROM 0.93 to 1.03
  - The top-level environment was restructured; stuff that used to be in
    System has been split into System and Compiler.  Note that the System
    side of this split is definitely NOT stable; it will change again in
    substantial ways.

  - The bootstrapping process has changed radically from version 0.93.
    If you don't know about sml-scb and "bin files", this version
    is probably not for you.

  - The "source groups" tool has been replaced with "SC", which generally works
    better.

