Skip to content

Commit 1e61222

Browse files
committed
Version 0.3.0
1 parent 9c8f28f commit 1e61222

File tree

10 files changed

+49
-21
lines changed

10 files changed

+49
-21
lines changed

.github/workflows/package-npm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
package_npm:
10-
runs-on: ubuntu-20.04 # 22.04 doesn't contain mlton
10+
runs-on: ubuntu-24.04
1111
steps:
1212
- uses: actions/checkout@v4
1313
- name: Install dependencies

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
## Version X.X.X
1+
## Version 0.3.0 (2025-10-12)
22

3-
* JavaScript: Add `JavaScript.isTruthy`
4-
* Lua: Add `Lua.isTruthy`
5-
* Lua: Add `Lua.call4`/.../`Lua.call9`/`Lua.method4`/.../`Lua.method9`
3+
* Add `check` subcommand
4+
* Add the Web targets: `--webjs`/`--webjs-cps`
5+
* Add `String16` and related structures in `$(SML_LIB)/basis/text16.mlb`
6+
* JavaScript: Add `JavaScript.Error`, `JavaScript.isTruthy`, `JavaScript.isNullOrUndefined`, `JavaScript.fromString16`, `JavaScript.Promise`, `JavaScript.async`/`JavaScript.await`
7+
* Lua: Add `Lua.isTruthy`, `Lua.newTableWith`, `Lua.newTableWithMetatable`, and `Lua.call4`/.../`Lua.call9`/`Lua.method4`/.../`Lua.method9`
68

79
## Version 0.2.1 (2024-11-12)
810

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@ The documentation is available at <https://lunarml.readthedocs.io/en/latest/>.
66

77
## Trying pre-built binaries
88

9-
Docker image is available.
9+
If you obtained an archive named `lunarml-{version}-{arch}-{os}.tar.gz`:
10+
11+
```
12+
$ tar xf lunarml-0.3.0-{arch}-{os}.tar.gz
13+
$ cd lunarml-0.3.0
14+
$ make install PREFIX=/opt/lunarml
15+
$ export PATH=/opt/lunarml/bin:$PATH
16+
$ lunarml compile example/hello.sml
17+
```
18+
19+
Also, Docker image is available:
1020

1121
```
1222
$ docker pull ghcr.io/minoki/lunarml:latest
13-
$ docker run --rm --platform linux/amd64 -v "$(pwd)":/work -w /work ghcr.io/minoki/lunarml:latest lunarml compile example/hello.sml
23+
$ docker run --rm -v "$(pwd)":/work -w /work ghcr.io/minoki/lunarml:latest lunarml compile example/hello.sml
1424
$ lua example/hello.lua
1525
Hello world!
1626
```
@@ -61,8 +71,8 @@ $ lunarml compile example/hello.sml
6171
Alternatively, you can use Docker to build and run LunarML.
6272

6373
```sh-session
64-
$ docker build --platform linux/amd64 -f package/docker/Dockerfile -t lunarml:0.2.1 .
65-
$ docker run --rm -v "$(pwd)":/work -w /work --platform linux/amd64 lunarml:0.2.1 lunarml compile example/hello.sml
74+
$ docker build -f package/docker/Dockerfile -t lunarml:0.3.0 .
75+
$ docker run --rm -v "$(pwd)":/work -w /work lunarml:0.3.0 lunarml compile example/hello.sml
6676
$ lua example/hello.lua
6777
Hello world!
6878
```

docs/intro.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,18 @@ Installation
2323
Pre-built binaries
2424
^^^^^^^^^^^^^^^^^^
2525

26-
Docker image is available::
26+
If you obtained an archive named ``lunarml-{version}-{arch}-{os}.tar.gz``::
27+
28+
$ tar xf lunarml-0.3.0-{arch}-{os}.tar.gz
29+
$ cd lunarml-0.3.0
30+
$ make install PREFIX=/opt/lunarml
31+
$ export PATH=/opt/lunarml/bin:$PATH
32+
$ lunarml compile example/hello.sml
33+
34+
Also, Docker image is available::
2735

2836
$ docker pull ghcr.io/minoki/lunarml:latest
29-
$ docker run --rm --platform linux/amd64 -v "$(pwd)":/work -w /work ghcr.io/minoki/lunarml:latest lunarml compile example/hello.sml
37+
$ docker run --rm -v "$(pwd)":/work -w /work ghcr.io/minoki/lunarml:latest lunarml compile example/hello.sml
3038
$ lua example/hello.lua
3139
Hello world!
3240

@@ -70,7 +78,7 @@ You can install the built binary with ``make install``::
7078

7179
Alternatively, you can use Docker to build and run LunarML::
7280

73-
$ docker build --platform linux/amd64 -f package/docker/Dockerfile -t lunarml:0.2.1 .
74-
$ docker run --rm -v "$(pwd)":/work -w /work --platform linux/amd64 lunarml:0.2.1 lunarml compile example/hello.sml
81+
$ docker build -f package/docker/Dockerfile -t lunarml:0.3.0 .
82+
$ docker run --rm -v "$(pwd)":/work -w /work lunarml:0.3.0 lunarml compile example/hello.sml
7583
$ lua example/hello.lua
7684
Hello world!

docs/javascript.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ Do not rely on it!
7474
``string``
7575
``Uint8Array``. Must not be modified.
7676

77-
``WideChar.char``
77+
``Char16.char``
7878
16-bit unsigned integer.
7979
The sign of zero must be positive.
8080

81-
``WideString.string``
81+
``String16.string``
8282
16-bit string (JavaScript's native String).
8383

8484
``Int54.int``

docs/language.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Examples:
9898
("\u{3042}" : string) = "\227\129\130"
9999
("\u{80}" : string) = "\194\128"
100100
("\u{1F600}" : string) = "\240\159\152\128"
101+
("\u{1F600}" : String16.string) = "\uD83D\uDE00"
101102
if WideChar.maxOrd = 255 then
102103
("\u{1F600}" : WideString.string) = "\240\159\152\128"
103104
else if WideChar.maxOrd = 65535 then
@@ -110,15 +111,16 @@ Examples of invalid constants:
110111
.. code-block::
111112
112113
#"\u{80}" : char (* equivalent to #"\194\128" *)
114+
#"\u{10000}" : Char16.char (* would be equivalent to #"\uD800\uDC00" *)
113115
if WideChar.maxOrd = 65535 then
114-
#"\u{10000}" : WideChar.char (* equivalent to #"\uD800\uDC00" *)
116+
#"\u{10000}" : WideChar.char (* would be equivalent to #"\uD800\uDC00" *)
115117
116118
Infix operators with surrounding dots
117119
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118120

119121
Status: experimental.
120122

121-
To use this extension, `allowInfixingDot` annotation in MLB file is needed::
123+
To use this extension, ``allowInfixingDot`` annotation in MLB file is needed::
122124

123125
ann "allowInfixingDot true" in
124126
...
@@ -166,7 +168,7 @@ To use this extension, ``valDescInComments`` annotation in MLB file is needed::
166168
*)
167169

168170
With this extension, comments that start with ``(*:`` will be parsed and the compatibility with the following value declaration (``val``, ``fun``) is checked against.
169-
Type mismatch is reported as warning or error.
171+
Type mismatch is reported as a warning or an error.
170172

171173
The content in the special comment does not affect type inference.
172174

docs/library.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ signature STRING
504504
structure String :> STRING where type string = string where type char = char
505505
structure WideString :> STRING where type char = WideChar.char
506506
507+
See also :ref:`text16`.
508+
507509
signature SUBSTRING
508510
^^^^^^^^^^^^^^^^^^^
509511

@@ -559,6 +561,8 @@ Status: partial.
559561
where type string = WideString.string
560562
where type char = WideChar.char
561563
564+
See also :ref:`text16`.
565+
562566
signature TEXT
563567
^^^^^^^^^^^^^^
564568

@@ -595,6 +599,8 @@ signature TEXT
595599
where type CharVectorSlice.slice = WideCharVectorSlice.slice
596600
where type CharArraySlice.slice = WideCharArraySlice.slice
597601
602+
See also :ref:`text16`.
603+
598604
structure List
599605
^^^^^^^^^^^^^^
600606

package/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lunarml",
3-
"version": "0.2.1",
3+
"version": "0.3.0",
44
"description": "",
55
"main": "lunarml.mjs",
66
"bin": { "lunarml": "bin/lunarml" },

src/version.sml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(* -*- mode: sml; mode: read-only -*- *)
22
(* This file was generated by set-version.sh *)
33
structure LunarMLVersion = struct
4-
val version = "0.2.1"
4+
val version = "0.3.0"
55
end;

version.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = 0.2.1
1+
VERSION = 0.3.0

0 commit comments

Comments
 (0)