-
Notifications
You must be signed in to change notification settings - Fork 14
/
cmlib.cm
executable file
·497 lines (486 loc) · 11.8 KB
/
cmlib.cm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
library
signature ARGUMENTS
signature ARITH
signature ARRAY_INF
signature ARRAY_UTIL
signature DATALESS_BRANCHING_TABLE
signature BYTESTRING
signature BYTESUBSTRING
signature CHECKPOINT_TABLE
signature CIPHER
signature CONT
signature CONVERT_INT_INF
signature CONVERT_WORD
signature COROUTINE
signature COSTRING
signature CRYPTO_HASH
signature DATALESS_HASH_TABLE
signature DATALESS_TABLE
signature DICT
signature EC_FIELD
signature ECDH
signature ECDSA
signature ELLIPTIC_CURVE
signature ELLIPTIC_CURVE_CODING
signature ELLIPTIC_CURVE_CRYPTO
signature ELLIPTIC_CURVE_PARAMS
signature FINALLY
signature FORTUNA
signature FRAME_DICT
signature FROM_STRING
signature HASH_INCREMENT
signature HASH_TABLE
signature HASHABLE
signature IDEQUE
signature IMPERATIVE_UNION_FIND
signature IO_UTIL
signature IPQUEUE
signature IQUEUE
signature LEX_ENGINE
signature MONO_LEX_ENGINE
signature LIST_UTIL
signature MINI_DATALESS_TABLE
signature MINI_DICT
signature MINI_TABLE
signature MINI_IO
signature MINI_STRING
signature MONAD
signature MONAD_UTIL
signature MULTI_FILE_IO
signature MULTI_TABLE
signature ORDERED
signature OUTPUT
signature PARSE_COMMAND_LINE
signature PARSE_ENGINE
signature PARSING
signature PARTITION
signature PATH
signature PICKLE
signature PICKLEABLE_CON
signature PICKLEABLE_TYPE
signature PQUEUE
signature PRETTY_PRINT
signature PSTREAM
signature PSUSP
signature QUEUE
signature RAND
signature RAND32
signature RANDOM
signature REGEXP
signature SEEK_IO
signature SEQUENCE
signature SET
signature SHARED_SECRET
signature SORT
signature STREAM
signature STREAMABLE
signature MONO_STREAMABLE
signature SUM
signature SUSP
signature SYMBOL
signature TABLE
signature TOPOLOGICAL_SORT
signature VOID
signature WEAK
structure AES
structure AESCBC
structure AESCFB
structure AESCTR
structure AESOFB
structure AESFortuna
structure AESRandom
structure Arguments
structure Arith
structure ArraySequence
structure ArrayInf
structure ArrayUtil
structure BinSeekIO
structure Bytestring
structure BytestringMiniString
structure BytestringHashable
structure Bytesubstring
structure BytesubstringCostring
structure BytesubstringMiniString
structure BytesubstringMonoStreamable
structure CharListDict
structure CharListSet
structure CharHashable
structure CharHashTable
structure CharOrdered
structure CharRedBlackSet
structure CharRedBlackDict
structure CharSplaySet
structure CharSplayDict
structure Cont
structure ConvertIntInf
structure ConvertWord
structure Coroutine
structure ECDERp
structure ECDER2m
structure ECDHp
structure ECDH2m
structure ECDSAp
structure ECDSA2m
structure EllipticCurveCryptoFp
structure EllipticCurveCryptoF2m
structure EllipticCurveF2m
structure EllipticCurveFp
structure EllipticCurveParams
structure FieldF2m
structure FieldFp
structure Finally
structure FromString
structure IDeque
structure IntListDict
structure IntListSet
structure IntHashable
structure IntHashTable
structure IntOrdered
structure IntPickleable
structure IntInfPickleable
structure IntRedBlackSet
structure IntRedBlackDict
structure IntSplaySet
structure IntSplayDict
structure IntInfListDict
structure IntInfListSet
structure IntInfHashable
structure IntInfOrdered
structure IntInfRedBlackSet
structure IntInfRedBlackDict
structure IntInfSplaySet
structure IntInfSplayDict
structure IQueue
structure JenkinsHash
structure Juliasort
structure ListMonad
structure ListSequence
structure ListStreamable
structure ListUtil
structure Mergesort
structure MJHash
structure MTRand
structure MTRand32
structure OptionMonad
structure Output
structure ParseCommandLine
structure Path
structure Pickle
structure PrettyPrint
structure PStream
structure PSusp
structure Queue
structure Quicksort
structure RedBlackTree
structure RehashRandom
structure RIPEMD160
structure SHA1
structure SHA256
structure Stream
structure StreamStreamable
structure StringHashable
structure StringHashTable
structure StringListDict
structure StringListSet
structure StringMiniString
structure StringOrdered
structure StringPickleable
structure StringRedBlackSet
structure StringRedBlackDict
structure StringSplaySet
structure StringSplayDict
structure Sum
structure StringSymbol
structure SubstringCostring
structure SubstringMiniString
structure SubstringMonoStreamable
structure Symbol
structure SymbolListDict
structure SymbolListSet
structure SymbolHashable
structure SymbolHashTable
structure SymbolOrdered
structure SymbolRedBlackSet
structure SymbolRedBlackDict
structure SymbolSplaySet
structure SymbolSplayDict
structure Susp
structure SuspMonad
structure TextIOUtil
structure TimeOrdered
structure TreeSequence
structure IUnionFind
structure UnitListDict
structure UnitListSet
structure UnitHashable
structure UnitHashTable
structure UnitOrdered
structure UnitRedBlackSet
structure UnitRedBlackDict
structure UnitSplaySet
structure UnitSplayDict
structure Void
structure Weak
structure Word8Hashable
structure WordHashable
functor ArithFun
functor DatalessBranchingTable
functor CBCCipherFun
functor CFBCipherFun
functor CTRCipherFun
functor CoercedStreamable
functor CostringFun
functor DatalessHashTable
functor DictCheckpointTable
functor DictMultiTable
functor DictPickleableFun
functor ECDHFun
functor ECDSAFun
functor EllipticCurveCryptoFun
functor EllipticCurveDERFun
functor EllipticCurveF2mFun
functor FortunaFun
functor FrameDictFun
functor HashDict
functor HashTable
functor HashTableCheckpointTable
functor InvertOrdered
functor LazyPairingPQueue
functor LeftistPQueue
functor LexEngineFun
functor MonoLexEngineFun
functor ListDict
functor ListHashable
functor ListOrdered
functor ListSet
functor MonadUtilFun
functor MultiFileIOFun
functor OFBCipherFun
functor OutputMonad
functor PairingIPQueue
functor PairingPQueue
functor PairOrdered
functor ParseEngineFun
functor ParsingFun
functor PartitionFun
functor ProductHashable
functor RandFromRand32
functor RandFromRandom
functor RedBlackDict
functor RedBlackSet
functor RegexpFun
functor SeekIOFun
functor SetHashable
functor SetPickleableFun
functor SplayDict
functor SplaySet
functor MonomorphizeStreamable
functor SymbolFun
functor SymbolHashableFun
functor SymbolOrderedFun
functor SymbolPickleableFun
functor TopologicalSort
library(basis.cm)
(* deprecated *)
signature COORD
signature COORDINATED_STREAM
signature POS
structure Coord
structure CoordinatedStream
structure Pos
is
aes.sml
arguments.sig
arguments.sml
arith.sig
arith.sml
array-inf.sig
array-inf.sml
array-util.sig
array-util.sml
asn1.sig
branching-table-dataless.sig
branching-table-dataless.sml
bytestring.sig
bytestring.sml
bytesubstring.sig
bytesubstring.sml
cipher.sig
command-line.sig
command-line.sml
cont.sig
convert-intinf.sig
convert-intinf.sml
convert-word.sig
coroutine.sig
coroutine.sml
costring.sig
costring.sml
cryptohash.sig
der.sml
dict.sig
dict-hash.sml
dict-list.sml
dict-mini.sig
dict-red-black.sml
dict-splay.sml
digital-signature.sig
ec.sig
ec-coding.sig
ec-crypto.sig
ec-crypto.sml
ec-der.sml
ecdh.sig
ecdh.sml
ec-field.sig
ec-fp.sml
ec-f2m.sml
ec-params.sig
ec-params.sml
ecdsa.sig
ecdsa.sml
finally.sig
finally.sml
fortuna.sig
fortuna.sml
frame-dict.sig
frame-dict.sml
from-string.sig
from-string.sml
hash-inc.sig
hash-inc.sml
hashable.sig
hashable.sml
hashable-2.sml
hash-table.sig
hash-table.sml
hash-table-dataless.sig
hash-table-dataless.sml
ideque.sig
ideque.sml
io-mini.sig
io-util.sig
io-util.sml
ipqueue.sig
ipqueue-pairing.sml
iqueue.sig
iqueue.sml
juliasort.sml
lex-engine.sig
lex-engine.sml
list-util.sig
list-util.sml
mergesort.sml
monad.sig
monad.sml
monad-util.sig
monad-util.sml
multi-file-io.sig
multi-file-io.sml
multi-table.sig
multi-table-dict.sml
ordered.sig
ordered.sml
ordered-2.sml
output.sig
output.sml
parse-engine.sig
parse-engine.sml
parsing.sig
parsing.sml
partition.sig
partition.sml
path.sig
path.sml
pickle.sig
pickle.sml
pickleable.sig
pickleable.sml
pqueue.sig
pqueue-lazy-pairing.sml
pqueue-leftist.sml
pqueue-pairing.sml
prettyprint.sig
prettyprint.sml
pstream.sig
pstream.sml
psusp.sig
psusp.sml
queue.sig
queue.sml
quicksort.sml
rand.sig
rand32.sig
rand-from-rand32.sml
rand-from-random.sml
rand-mt.sml
random.sig
random-aes.sml
random-rehash.sml
red-black-tree.sml
regexp.sig
regexp.sml
ripemd160.sml
seek-io.sig
seek-io.sml
sequence.sig
sequence-array.sml
sequence-list.sml
sequence-tree.sml
set.sig
set-list.sml
set-red-black.sml
set-splay.sml
sha1.sml
sha256.sml
shared-secret.sig
sort.sig
splay-tree.sml
stream.sig
stream.sml
stream-cipher-fun.sml
streamable.sig
streamable.sml
streamable-2.sml
streamable-mono.sig
streamable-mono.sml
streamable-mono-2.sml
string-mini.sig
string-mini.sml
sum.sig
sum.sml
susp.sig
susp-monad.sml
symbol.sig
symbol.sml
table.sig
table-checkpoint.sig
table-dataless.sig
table-dataless-mini.sig
table-checkpoint-dict.sml
table-checkpoint-hash.sml
table-mini.sig
topological-sort.sig
topological-sort.sml
union-find-imperative.sig
union-find-imperative.sml
void.sig
void.sml
weak.sig
basis.cm
(* SML/NJ implementations *)
cont-nj.sml
#if SIZE_32=1
convert-word-nj.sml
#else
convert-word-nj64.sml
#endif
susp-nj.sml
weak-nj.sml
defaults.sml
deprecated/coord.sig
deprecated/coord.sml
deprecated/coord-stream.sig
deprecated/coord-stream.sml
deprecated/pos.sig
deprecated/pos.sml