Standard ML of New Jersey
Version 110.80 NEWS
August 19, 2016

SML/NJ HOME:
  http://www.smlnj.org/index.html
FILES:
  http://smlnj.cs.uchicago.edu/dist/working/110.80/

### Summary:

This release incudes further additions to the Basis Library and many bug fixes. As did 110.79, it includes some initial support for Successor ML, which is an evolution of the Standard ML language. It also has support for the upcoming version of macOS Sierra.

### Details:

Basis Library:

  This version continues to track proposed Basis Library improvements. Note that these improvements are proposals that have not yet been ratified and are subject to change! Specifically, the following proposals are supported by this version of SML/NJ:

  [2015-001] Correction to ListPair
    SML/NJ already implemented the semantics described in this proposal.
  [2015-002] Addition of Either module
    This change adds the Either structure to the Basis Library.
    In version 110.80, we have added the functions mapLeft, mapRight, appLeft, and appRight functions to the Either module.
  [2015-003] Additional operations on sequences
    This change adds operations to the Array, List, ListPair, Option, and Vector structures, and to the MONO_ARRAY and MONO_VECTOR signatures.
    In version 110.80, we have added the functions unzipMap, unzipMapi, find, and findi functions to the ListPair module.
  [2015-005] Addition of Fn module
    This change adds the Fn structure to the Basis Library.
  [2015-007] Addition of Ref module
    This change adds the Ref structure to the Basis Library.
  [2015-009] Policy for exceptions and partial applications
    This change standardizes the generation of exceptions when partially applying curried basis functions. The change fixed bug 136.
  [2016-001] Add popCount to WORD signature
    This change adds the popCount function to the WORD signature.

  It is very unlikely that these changes will break existing code, but there are a couple of scenarios in which the code might break. The first is conflicts created by the use of open. For example, the implementation of ml-yacc had declarations of the form

  open Array List

  which created a type error because List.sub shadowed Array.sub.

  The second class of problem is when a module implements one of the affected Basis signatures. For example, the MLRISC library had two modules that implemented extensions of the ARRAY signature and which required modification to compile.

  In such cases, we recommend updating the source code, but it is also possible to compile against the old version of the Basis Library by changing the line

  $/basis.cm

  to

  $/basis-2004.cm

  in your CM files. Note that backward-compatible version of the Basis Library is only available if the old-basis target in config/targets was requested when SML/NJ was built (this target is requested by default).

Successor ML:

  Successor ML is collection of proposed enhancements to the Standard ML language. In collaboration with the MLton implementors, we are starting to add support for these features the SML/NJ. This release does not include any new features over what was supported in version 110.79 (i.e., lexical extensions). We plan to start adding syntactic extensions to the core language in the next release.

  The Successor ML features can be enabled using the command-line option -Cparser.succ-ml=true or by using the assignment

  Control.succML := true;

  at the REPL. There is a known bug (#153) that you man encounter when enabling Successor ML features from the REPL; namely, there is some latency from when you set the Control.succML flag and when the lexer switches mode.

  It is also possible to mark individual source files as being "Successor ML" sources in a CM file. There are several ways to do so; the easiest is to specify that they should be handled by the "succ-ml" tool:

  foo.sml : succ-ml

  Alternatively, one can give the "succ-ml" argument to the "sml" tool:

  foo.sml : sml (succ-ml) foo.sml (succ-ml)

  It is also possible to enable them by setting the control flag using the with keyword in a CM file as illustrated by the following equivalent forms:

  foo.sml (with: parser.succ-ml) foo.sml (with: parser.succ-ml=true) foo.sml (with:(name:parser.succ-ml)) foo.sml (with:(name:parser.succ-ml value:true))

SML/NJ Library:

  A number of changes to the ORD_SET signature. The following functions were added:

  val minItem : set -> item val maxItem : set -> item val toList : set -> item list

  In addition, the function listItems is now considered deprecated.

  Added the function Controls.help for getting the help string from a control.

  Added the functions mkOption, mkOptionReqArg, and mkOptionFlag to the Controls module. These functions make it easier to package controls as command-line options. They provide an alternative to the usual approach of using a "--C<ctl>=<value>" form for all of the controls.

  Fixed a bug (#144) in the implementation of the all function in the splay-tree implementation of sets (functor SplaySetFn).

  Fixed a bug (#167) in the way that the GetOpt module handles long arguments. Previously, it was not possible to have one long argument that was a prefix of another (e.g., "--foo" and "--foobar"). The new behavior is to allow long-option prefixes to overlap with other long options, but to favor an exact match over prefix matches. For example, if the long options are "--foo," "--foobar," and "--foobaz," then "--foo" will match the first, but "--foob" will be flagged as ambiguous.

### Bugs:

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

144 | Splay sets are broken
145 | Internal exception occurs on bogus annotation instead of typechecking diagnostic
146 | Problems building on recent versions of 64-bit Ubuntu
147 | Hexadecimal escapes in strings are not supported
150 | Add title to batch script
151 | Error installing from source on Mac OS X
154 | Return code for ml-ulex when there is an error
155 | Misleading printing of word literals in error messages
156 | SML resumes after SIGSTOP with bogus exception report
161 | MLRISC incorrect dividend sign extension before 32-bit divide in x86_64
164 | Inaccurate install instructions, ia32-libs have been deprecated
166 | Can't install SML/NJ in directories containing spaces
167 | Bug in handling of long options in GetOpt

The following unnumbered bugs were also fixed:

- Fixed the handling of the Error exception in the interactive loop so that we no longer get an exception traceback from syntax and type errors in user code.
- Fixed a bug in the implementation of ml-lex-mode in ml-ulex. The '\h' escape was not supported (it is supposed to match the character range [\128-\255]).

### 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)
> | Mac OS X 10.11 (El Capitan)
> | macOS Sierra
> | Ubuntu 14.04.3 (GNU/Linux 3.13.0)
> | Windows 7
> | Cygwin (hosted on Windows 7)

> We believe that it runs on any recent Linux distribution 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.