:version: 2025.3
:date: December 22, 2025
:dist-dir: https://smlnj.org/dist/working/{version}/
:history: {dist-dir}HISTORY.html
:issue-base: https://github.com/smlnj/smlnj/issues
:legacy-issue-base: https://github.com/smlnj/legacy/issues
:pull-base: https://github.com/smlnj/smlnj/pull
:legacy-pull-base: https://github.com/smlnj/legacy/pull
:wiki-base: https://github.com/smlnj/.github/wiki
:stem: latexmath
:source-highlighter: pygments
:stylesheet: release-notes.css
:notitle:

= Standard ML of New Jersey Release Notes

[subs=attributes]
++++
<div class="smlnj-banner">
  <span class="title"> Standard ML of New Jersey <br/> Release Notes </span>
  <br/> <br/>
  <span class="subtitle"> Version {version} <br/> {date} </span>
</div>
++++

''''''''
--
SML/NJ HOME::
  https://www.smlnj.org/index.html[[.tt]#https://smlnj.org#]
FILES::
  {dist-dir}index.html[[.tt]#{dist-dir}#]
--
''''''''

== Summary

This release implements a new {wiki-base}/New-Binfile-Format[containerized
binfile format] that is more extensible that the previous format.  This
release also contains a number of bug fixes and library enhancements.
This release also supports Linux on {pull-base}/331[Arm64 processors].

== Details

=== Compiler

* Added support for normalizing the CFG before export.  There is a
  new control (`-Ccg.normalize-cfg` or `Control.CG.normalizeCFG`) for
  enabling this feature.  It affects code generation, dumping of CFG
  pickles, and printing of the CFG.

=== CM

* We are now using **ASDL** to implement the pickling/unpickling of skeleton files.

=== Runtime System

* fixed various space leaks in the runtime system
    - the ASDL generated code did not correctly free sequences
    - the heap-export code was failing to free some meta-data

=== SML/NJ Library

* Added `LEB128` module, which implements packed encoding and decoding
  of integer and word types using the _Little Endian Base 128_ encoding.

=== ASDL

* Added the `is_datatype` property

* Fixed the generation of destructors for sequences

== Bugs

Here is a list of the issues and pull requests that are closed with this release.

[.buglist,cols="^1,<15",strips="none",options="header"]
|=======
| Issue
| Description
| [.bugid]#137#
| {issue-base}/137[Typechecker hangs with a large number of curried arguments]
| [.bugid]#262#
| {issue-base}/262[Compiler bug in type checker: unexpected pattern]
| [.bugid]#313#
| {issue-base}/313[Remove unnecessary LLVM executables from `runtime/bin`]
| [.bugid]#314#
| {issue-base}/314[LLVM fails to build using the `build.sh` script]
| [.bugid]#315#
| {issue-base}/315[Run-time system fails to build using the `build.sh` script]
| [.bugid]#316#
| {issue-base}/316[asdlgen fails to build with gcc 15]
| [.bugid]#317#
| {issue-base}/317[Bug in type checking/inference with type abbreviations through transparent functor application]
| [.bugid]#319#
| {issue-base}/319[Nondeterministic import order]
| [.bugid]#322#
| {pull-base}/322[Fix heap export inconsistency caused by pair arena offsets]
| [.bugid]#323#
| {pull-base}/323[Fix memory leaks in the runtime system]
| [.bugid]#324#
| {issue-base}/324[The `Bind` exception is raised in the compiler when an undefined signature name is encountered]
| [.bugid]#325#
| {pull-base}/325[`setPosOut` should return an `outstream`]
| [.bugid]#331#
| {pull-base}/331[AArch64 Linux support]
|=======

We also fixed the following bugs that did not have issues
associated with them (or were bug fixes ported from the legacy
repository):

* Merged fix for {legacy-issue-base}/370[Legacy Issue #370
  (`Int32` operations do not properly raise `Overflow`)]

* Merged fix for {legacy-issue-base}/372[Legacy Issue #372
  (`Int32.toString` can generate an `Overflow` exception)]

* Fixed a situation where an error in a pattern caused an internal
  compiler error.

== Supported systems

We believe that SML/NJ will build and run on the following systems, but have only
tested some of them:

[.support-table,cols="^2s,^4v,^3v",options="header",strips="none"]
|=======
| Architecture | Operating System | Status
| AMD64 | |
| | macOS 11 (Big Sur) |
| | macOS 12 (Monterey) |
| | macOS 13 (Ventura) |
| | macOS 14 (Sonoma) |
| | macOS 15 (Sequoia) | Tested
| | macOS 26 (Tahoe) |
| | Ubuntu 20.04.6 LTS | Tested
| | Ubuntu 22.04.2 LTS | Tested
| {nbsp} | |
| ARM64 | |
| | macOS 11 (Big Sur) |
| | macOS 12 (Monterey) |
| | macOS 13 (Ventura) |
| | macOS 14 (Sonoma) |
| | macOS 15 (Sequoia) | Tested
| | macOS 26 (Tahoe) | Tested
| | Linux |
| {nbsp} | |
|=======
