Skip to content

Commit 1699d55

Browse files
committed
add: ml_bind.sml for loading modules on Poly/ML
1 parent 768bd3d commit 1699d55

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

Makefile.polyml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
POLYML ?= poly
3+
POLYMLC ?= polyc
4+
5+
SRC := $(wildcard src/*.sml)
6+
7+
8+
all: smlunit
9+
10+
11+
.PHONY: smlunit
12+
smlunit: polyml_make.sml
13+
$(POLYML) -q --error-exit --use ./usesig.sml < polyml_make.sml
14+
15+
16+
smlunit-test-poly.o: test/export.sml $(SRC)
17+
$(POLYML) -q --error-exit < test/export.sml
18+
19+
20+
smlunit-test-poly: smlunit-test-poly.o
21+
$(POLYMLC) -o $@ $^
22+
23+
24+
test: smlunit-test-poly
25+
./smlunit-test-poly
26+
27+
28+
PHOENY: clean
29+
clean:
30+
$(RM) smlunit-test-poly
31+
$(RM) smlunit-test-poly.o
32+

polyml_make.sml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
val _ = PolyML.make "src/main"

src/main/ml_bind.sml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
structure SMLUnit = SMLUnit
3+

usesig.sml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
val _ = PolyML.suffixes := ".sig"::(!PolyML.suffixes)

0 commit comments

Comments
 (0)