A standard ML compiler that produces Lua / JavaScript.
- Most of SML '97 language + Signatures + Functors
- A subset of the SML Basis Library
- An Interface to Lua
- ML Basis system like MLton
-
Monomorphic non-exhaustive bindings
-
Simplified recursive value bindings
SML '97-compatible ordering for
type variables is also supported:val <tyvarseq> rec <valbind>
-
Abstype as derived form
-
Fixed manifest type specifications
-
Abolish sequenced type realizations
-
Line comments
-
Extended literal syntax
- Underscores
3.1415_9265
0xffff_ffff
- Binary notation
0wb
0b
- Eight hex digits in text
\Uxxxxxxxx
- Underscores
-
Record punning
-
Record extension
-
Record update
-
Conjunctive patterns
-
Disjunctive patterns
-
Nested matches
-
Pattern guards
-
Optional bars and semicolons
-
Optional else branch
-
Do declarations
-
With type in signatures
-
Vector expressions and patterns
-
Packaged modules
Alice ML
HaMLet S
-
Hexadecimal floating-point constants
0x1.ffff_ffff_ffff_f
0x1p1024
<hexadecimal-integer-constant> ::= '~'? '0' 'w'? 'x' <hexadecimal-digit-sequence>
<hexadecimal-floating-point-constant> ::= '~'? '0x' <hexadecimal-digit-sequence> (<binary-exponent-part> |
'.' <hexadecimal-digit-sequence> <binary-exponent-part>?)
<hexadecimal-digit-sequence> ::= <hexadecimal-digit> ('_'* <hexadecimal-digit>)*
<binary-exponent-part> ::= [pP] '~'? <digit> ('_'* <digit>)?
The ( binary ) exponent part is optional and
tilde (~
) is used for the negation symbol. -
Variably-encoded Unicode escape sequence in string literals