How do I comment in SML code?

Standard ML lacks line comments. This RFC recommends that line comments begin with ‘#’ preceded and followed by whitespace (where both newline and (start|end)-of-file are interpreted as whitespace) and end, of course, with #”\n”.

How do I use SML in NJ?

Once in the SML mode, you can start SML/NJ by typing M-x sml, or by selecting SML/Process/Start default ML compiler from the menu. This will start SML/NJ running in the background. You can then bring up an SML/NJ window by typing C-c C-s, or by selecting SML/Process/switch to ML buffer from the menu.

What is SML language?

Standard ML (SML) is a general-purpose modular functional programming language with compile-time type checking and type inference. Standard ML is a modern dialect of ML, the language used in the Logic for Computable Functions (LCF) theorem-proving project.

How do I download Smlnj?

Go to http://www.smlnj.org/dist/working/ and find the latest release, e.g. 110.80 Distribution Files. Scroll down and find the MS Windows Installer, e.g. smlnj-110.80. msi. Run the installer.

What is SML written in?

Aside from its runtime system, which is written in C, SML/NJ is written in Standard ML. It was originally developed jointly by Bell Laboratories and Princeton University.

How do I use SML?

Interactive mode:

  1. To start the SML interpreter at the terminal, type “sml” and press enter.
  2. To exit SML, press CTRL+D (or CTRL+Z under Windows).
  3. Press CTRL+C to interrupt SML or start a new input line.
  4. As an example, type “2 + 2;” at the SML prompt and press enter. (

What is an option in SML?

Option is an algebraic or compound data structure found in SML’s Basis Library. More on the Option data type at Wikipedia. The big idea is, allow a function to return the value None when it doesn’t make sense for the function to return a value of the type which the programmer really cares about.

Is Haskell an ML language?

Today there are several languages in the ML family; the three most prominent are Standard ML (SML), OCaml and F#. Ideas from ML have influenced numerous other languages, like Haskell, Cyclone, Nemerle, ATS, and Elm.

How do you use MLton?

MLton is run from the command line with a collection of options followed by a file name and a list of files with which to compile, assemble, and link with. The simplest case is to run mlton foo. sml, where foo. sml contains a valid SML program, in which case MLton compiles the program to produce an executable foo.

Can you use line comments in SML / NJ?

There is a RFC for line comments, which proposes a hashmark followed by a whitespace. Single-line comments now ship in both MLton and SML/NJ, as long as you enable sML (“Successor ML”) extensions ( sml -Cparser.succ-ml=true for SML/NJ). Here’s a concrete example.

Which is the latest version of SML / NJ?

SML/NJ is free, open source software. [2021-04-12] Version 110.99.1 is released. The main purpose of this patch release is to support installing and running SML/NJ on M1 Macs under the Rosetta2 translator. The release also contains a couple of bug fixes; see the README for details.

Can you use single line comments in MLton?

Single-line comments now ship in both MLton and SML/NJ, as long as you enable sML (“Successor ML”) extensions ( sml -Cparser.succ-ml=true for SML/NJ). Here’s a concrete example. In the definition below, the value 1 is ignored, and the definition of a is taken from the next line ( 2) instead.

Is there a version of smlnj that supports 64 bits?

Also that SML/NJ 110.99 supports 64 bits, but the version on ubuntu using sudo apt install smlnj is still at 110.76, so I think another solution to this is goto here and download version 110.99 and then compile. Sorry, something went wrong. Sign up for free to join this conversation on GitHub .