Standard ML of New Jersey
Version 110.77 NEWS
August 22, 2014



The primary purpose of this release is bug fixes, but it does include some new features and adds support for Mac OS X 10.10 (Yosemite).


SML/NJ compiler:

We added the PackWord{16,32}{Big,Little} structures to the Unsafe module. This change makes SML/NJ's UNSAFE signature closer to the MLton version.


Fixed an inconsistency in the way that ml-antlr and ml-ulex handled the contents of a %defs declaration. Ml-ulex made these definitions visible in the UserDeclarations substructure, whereas ml-antlr hid them. We have changed the behavior of ml-ulex to match that of ml-antlr (i.e., hide the user definitions). We chose to hide the user definitions in ml-ulex because they are usually not useful outside the lexer, hiding them reduces The size of the generated code, and definitions that are needed outside the lexer can be defined in an external module. Note that the previous behavior remains when ml-ulex is run in ml-lex compatibility mode. (This change addresses bug #79).

Added the actionToString' and repairToString' functions to the AntlrRepair structure. These functions allow one to specialize the printing of tokens based on whether they are being added or deleted.

Removed the toksToString function from the tokens structure that ml-antlr generates. It was originally for use by the AntlrRepair structure, but that structure does not use it.

Fixed a minor bug where a syntax error in the grammar specification could go undetected and result in a syntatically incorrect output file.

Improvements to the documentation.

SML/NJ Library:

Added new library for parsing XML files. The library does not support validation or the full XML syntax. It is designed to for applications that need to process XML-format data files. To include the library in a project, add the following line in your CM file:


Reimplementation of the delete/remove operations in the red-black-tree versions of sets and maps. The previous implementation had a bug that could result in violations of the data-structure invariants, which was leading to unbalanced trees and loss of performance.

Fixes and improvements to the S-expression parsing library. The supported syntax is now a proper subset of that found in Lisp-like languages.

Build scripts

Changed how the system handles running on Cygwin. Previously, the default behavior was to run the Win32 version of the runtime. Now the default behavior is to run the Cygwin (i.e., Unix) version of the runtime. Setting the shell variable SMLNJ_WINDOWS_RUNTIME to any non-empty value will cause the Win32 runtime to be used. The script config/ has been added to make using Cygwin to build the windows version more convenient.


This release includes Unix-style manual pages for the command-line tools. On Mac OS X (x86 only), the installer will copy these to /usr/local/share/man (if it exists).


Here is a list of tracked bugs fixed (or closed) with this release, please see the bug tracker for more details.

35Please ship manpages for binaries
79ml-lpt: inconsistent treatment of %defs directive between ml-antlr and ml-ulex
85top-level identfiers in generated code clash with legacy code
110IntInf.~>> returns the wrong answer on negative input
119Conversion from vector of tuple to vector of vector causes a crash
120Install fails w/ map failure on Chromebook
124Add support for OpenBSD/powerpc
125build script is broken on Cygwin-x86
127Crash on windows with OS.Process.system
128Basis spec violation, race condition in OS.Filesys.tmpName()

The following unnumbered bugs were also fixed:

Supported systems:

We have verified that the system builds and runs on the following systems.

Architecture Operating System
PowerPC Mac OS X 10.5 (Leopard)
x86 Mac OS X 10.6 (Snow Leopard)
Mac OS X 10.7 (Lion)
Mac OS X 10.8 (Mountain Lion)
Mac OS X 10.9 (Mavericks)
Mac OS X 10.10 (Yosemite)
Ubuntu 12.04.4 (GNU/Linux 3.2.0)
Windows 7
Cygwin (hosted on Windows 7)

We believe that it runs on any recent Linux distribute that has support for 32-bit executables, as well as on BSD variants, SPARC/Solaris, and PPC/AIX, but we have not tested these systems.