File tree 1 file changed +33
-2
lines changed
1 file changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,43 @@ foo_test.sml
101
101
102
102
### PolyML
103
103
104
- ` PolyML.loadModule "/path/to/libsmlunit.poly" ` for other project.
104
+ To build, just ` make ` :
105
+
106
+ ``` sh
107
+ $ make -f Makefile.polyml
108
+ echo " " | poly -q --error-exit --eval ' PolyML.suffixes := ".sig"::(!PolyML.suffixes)' \
109
+ --eval ' PolyML.make "src/main"' \
110
+ --use export.sml \
111
+ --eval ' PolyML.SaveState.saveModule ("libsmlunit.poly", SMLUnit)'
112
+ Making main
113
+ Making SMLUnit
114
+ ..
115
+ Created structure SMLUnit
116
+ ```
117
+
118
+ Then you will get ` ./libsmlunit.poly ` which is the collection of SMLUnit entities that can be loaded.
105
119
106
120
``` sh
107
121
$ poly
108
122
> PolyML.loadModule " /path/to/libsmlunit.poly" ;
123
+ signature ASSERT =
124
+ sig
125
+ ..
126
+ signature TESTRUNNER =
127
+ sig type parameter val runTest: parameter -> Test.test -> unit end
109
128
val it = (): unit
110
- >
111
129
```
112
130
131
+ It is possible to loading directly to the REPL:
132
+
133
+ ``` sh
134
+ $ poly --eval ' PolyML.suffixes := ".sig"::(!PolyML.suffixes)'
135
+ > PolyML.make " src/main" ;
136
+ Making main
137
+ Making SMLUnit
138
+ ..
139
+ structure SMLUnit: SMLUNIT
140
+ val it = (): unit
141
+ ```
142
+
143
+
You can’t perform that action at this time.
0 commit comments