A Standard ML compiler that produces Lua.
You need a recent version of MLton to build the executable, and Lua 5.3+ to run the compiled script.
$ make
$ make test
$ ./lunarml example/hello.sml
$ lua example/hello.lua
Hello world!
- Most of SML '97 language, including signatures and functors
- A subset of SML Basis Library
- Interface to Lua
- ML Basis system like MLton
Successor ML features:
- Monomorphic non-exhaustive bindings
- Simplified recursive value bindings
- SML '97-compatible ordering for type variables is also supported:
val <tyvarseq> rec <valbind>
- SML '97-compatible ordering for type variables is also supported:
- Abstype as derived form
- Fixed manifest type specifications
- Abolish sequenced type realizations
- Line comments
- Extended literal syntax
- Record punning
- Record extension
- in patterns
- in expressions
- in types
- Record update
- Conjunctive patterns
- Nested matches
- Pattern guards
- Optional bars and semicolons
- Optional else branch
- Do declarations
- Withtype in signatures
Other extensions planned:
- Vector expressions and patterns
- Packaged modules (like in Alice ML or HaMLet S)
- Hexadecimal floating-point literals
- Variably-encoded Unicode escape sequence in string literals