Moscow ML Browser Interpreter
A browser-based Standard ML interpreter targeting the Moscow ML dialect. Runs entirely client-side.
Keyboard shortcuts
| Cmd/Ctrl+Enter | Run program |
| Cmd/Ctrl+L | Clear output |
Known divergences from Moscow ML
- Real equality:
1.0 = 1.0 is rejected (SML '97). Use Real.== for IEEE equality.
- Integer range: 53-bit precision (JS
number) vs Moscow ML's 31-bit. No overflow enforcement.
- Word size: 32-bit (
Word.wordSize = 32) vs Moscow ML's 31-bit.
- No file I/O:
TextIO.openIn/openOut raise errors. Use TextIO.print and print for output.
- No stdin:
TextIO.inputLine raises an error.
- No separate compilation: No
load or use.
- Step limit: Programs are terminated after 10,000,000 evaluation steps to prevent infinite loops.
Reference
Moscow ML Language Overview v2.00
About
An open-source SML interpreter that runs entirely in your browser. Built with TypeScript and CodeMirror.
Source code on GitHub - Licensed under AGPL-3.0