• Stars
    star
    209
  • Rank 188,325 (Top 4 %)
  • Language Standard ML
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Standard ML compiler that produces Lua/JavaScript

LunarML

A Standard ML compiler that produces Lua/JavaScript.

Building

You need a recent version of MLton to build the executable, and Lua 5.3+ or recent Node.js to run the compiled script.

$ make
$ make test-lua
$ make test-lua-continuations
$ make test-luajit
$ make test-nodejs
$ make test-nodejs-cps
$ bin/lunarml compile example/hello.sml
$ lua example/hello.lua
Hello world!

Usage

lunarml [subcommand] [options] input.(sml|mlb)

Subcommands:

  • compile: Compile a program.
  • help: Show help.
  • version: Show version information.

Targets:

  • Lua
    • --lua (default): Targets Lua 5.3+.
    • --lua-continuations: Targets Lua 5.3+. Supports one-shot delimited continuations. Also, supports deeply nested handle.
    • --luajit: Targets LuaJIT.
  • JavaScript (ES2020+)
    • --js: Produces a JavaScript program.
    • --js-cps: Produces a JavaScript program (CPS mode; supports delimited continuations).

Output type:

  • --exe (default): Produces Lua/JavaScript program.
  • --lib: Produces a Lua module.

Features

More Repositories

1

InputSourceSelector

A utility program to manipulate Input Sources on Mac OS X.
Objective-C
120
star
2

purescript-tsd-gen

TypeScript Declaration File (.d.ts) generator for PureScript
Haskell
88
star
3

cluttex

Process LaTeX documents without cluttering your working directory
Lua
39
star
4

pandoc-aozora-ruby

青空文庫風のルビを解釈するPandoc filterです
Haskell
22
star
5

rounded-hw

Directed rounding and interval arithmetics with builtin floating types
Haskell
11
star
6

luaexif

Lua binding for libexif
C
10
star
7

algebraic-num-example

「代数的数を作る 多項式の根と因数分解のアルゴリズム」のサンプルコード
Haskell
8
star
8

unboxing-vector

A newtype-friendly wrapper for Data.Vector.Unboxed
Haskell
6
star
9

lobjc

A bridge between Lua and Objective-C
Objective-C
6
star
10

ghc-docker

Dockerfile(s) for GHC
Dockerfile
6
star
11

yurumath

ゆるい LaTeX数式 → MathML 変換器(になる予定)
Haskell
5
star
12

haskell-floating-point

Haskell libraries for floating point numbers (fp-ieee and rounded-hw)
Haskell
5
star
13

my-atcoder-solutions

AtCoderのオレオレ解答集(主にHaskell) by @mod_poppo
Haskell
4
star
14

fibonacci-hs

Fibonnacci sequence in Haskell
Haskell
3
star
15

LambdaQuest

An implementation of System F, System Fsub (F_{<:}) and Finter (F_∧)
Haskell
3
star
16

min-caml-hs

MinCaml implementation in Haskell
Haskell
3
star
17

delimited-continuations-in-lua

Lua
2
star
18

algebraic-real-article

週刊 代数的実数を作る
Haskell
2
star
19

rxpattern

A Haxe library to build regular expression patterns
Haxe
2
star
20

javascript-limits

Limits of JavaScript
JavaScript
2
star
21

icfpc2006

My solutions to ICFP Programming Contest 2006 "The Cult of the Bound Variable", including JITting VM for the Universal Machine
C
2
star
22

singularity

A web page that demonstrates how complex integrals work
TypeScript
2
star
23

filesystemwatch-test

Test programs for watching file changes
Lua
2
star
24

hs-inline-asm-test

Compare several ways to access certain CPU instructions from Haskell
HTML
1
star
25

jstrans

Translates extended-JavaScript code into ordinary one
Haskell
1
star
26

lua-ext-wasmer

Wasmer binding for Lua
C
1
star
27

setTextEncoding

A utility to set text file encoding (com.apple.TextEncoding attribute) on Mac OS X
Objective-C
1
star