Unifying Exceptions with Constructors in Standard ML

R. Milner, M. Tofte, D. MacQueen, A. Appel

Abstract: This brief report describes a uniform treatment
of exception values and constructed values in Standard ML. The
application of an exception constructor to a value yields an
exception value. Exception values are values. In particular, they
can be passed as arguments to functions and returned as results.
Like constructed values they can be decomposed using pattern
matching, but unlike constructed values they can be raised and
handled.

This treatment of exceptions has been adopted in ``The
Definition of Standard ML, Version 2'' as predicted in ``The
Semantics of Standard ML, Version 1''.