HaMLet is a faithful and complete implementation of the Standard ML programming language (SML'97). It aims to be
The implementation is intended to be as direct a translation of the language formalisation found in the Definition of Standard ML [1] as possible, modulo bug fixes. It tries hard to get all details of the Definition right. The HaMLet source code
HaMLet can perform different phases of execution — like parsing, elaboration (type checking), and evaluation — selectively. In particular, it is possible to execute programs in an untyped manner, thus exploring a universe where even ML programs "can go wrong".
It should be emphasized that HaMLet is by no means a development system, but has been solely written with the aforementioned goal of experimentation in mind. Interpretation is highly inefficient (since it is a direct implementation of the semantic rules) and error messages are rather basic. However, HaMLet is able to bootstrap itself.
As a byproduct, the HaMLet documentation contains a comprehensive list of all known bugs and `grey areas' in the current version of the SML language definition, which may be interesting on its own.
Release 2.0 (2013/10/10) brings a major revamp of the internal AST representation. In particular, elaboration now stores its results in the AST, which should make HaMLet more useful as an experimental compiler front-end. As a proof of concept, the release also integrates a simple compiler to JavaScript.
The most significant changes are:
See the change log for more details.
The HaMLet sources are available as a tarball, zipfile or Debian package:
For questions, comments and bug reports please contact the author at
Feedback is always welcome.
There also is a special "HaMLet S" that incorporates proposals for Successor ML (sML). It represents a testbed and sort of a personal vision of where sML might go have gone. Its most interesting features are:
Downloads:
See changes for a version history. Note that HaMLet S is still based on HaMLet 1.3.
SML implementations more suitable as proper development systems are:
HaMLet evolved as a byproduct of the Alice project, and owes much of its existence to the first version of the ML Kit, which took a very similar approach.