-
Notifications
You must be signed in to change notification settings - Fork 5
/
core.sls
359 lines (307 loc) · 10.9 KB
/
core.sls
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
(library (core)
(export null eof void void?
begin0
dynamic-wind
call-with-current-continuation
call-with-composable-continuation
call-with-escape-continuation
make-continuation-prompt-tag
default-continuation-prompt-tag
root-continuation-prompt-tag
call-with-continuation-prompt
call-with-continuation-barrier
abort-current-continuation
continuation-prompt-available?
(rename [break-enabled-key core:break-enabled-key])
with-continuation-mark
call-with-immediate-continuation-mark
continuation-mark-set-first
continuation-mark-set->list
continuation-mark-set->list*
current-continuation-marks
continuation-marks
continuation-mark-set?
make-engine
engine-block
engine-return
make-thread-cell
thread-cell?
thread-cell-ref
thread-cell-set!
parameterization-key
make-parameter
extend-parameterization
parameterization?
raise
error-print-width
error-value->string-handler
error-print-context-length
exception-handler-key
uncaught-exception-handler
current-inspector
make-inspector
struct:exn exn exn? exn-message exn-continuation-marks
struct:exn:break exn:break exn:break? exn:break-continuation
struct:exn:break:hang-up exn:break:hang-up exn:break:hang-up?
struct:exn:break:terminate exn:break:terminate exn:break:terminate?
struct:exn:fail exn:fail exn:fail?
struct:exn:fail:contract exn:fail:contract exn:fail:contract?
struct:exn:fail:contract:arity exn:fail:contract:arity exn:fail:contract:arity?
struct:exn:fail:contract:divide-by-zero exn:fail:contract:divide-by-zero exn:fail:contract:divide-by-zero?
struct:exn:fail:contract:non-fixnum-result exn:fail:contract:non-fixnum-result exn:fail:contract:non-fixnum-result?
struct:exn:fail:contract:continuation exn:fail:contract:continuation exn:fail:contract:continuation?
struct:exn:fail:contract:variable exn:fail:contract:variable exn:fail:contract:variable?
struct:exn:fail:read exn:fail:read exn:fail:read? exn:fail:read-srclocs
struct:exn:fail:read:eof exn:fail:read:eof exn:fail:read:eof?
struct:exn:fail:read:non-char exn:fail:read:non-char exn:fail:read:non-char?
struct:exn:fail:filesystem exn:fail:filesystem exn:fail:filesystem?
struct:exn:fail:filesystem:exists exn:fail:filesystem:exists exn:fail:filesystem:exists?
struct:exn:fail:filesystem:version exn:fail:filesystem:version exn:fail:filesystem:version?
struct:exn:fail:filesystem:errno exn:fail:filesystem:errno exn:fail:filesystem:errno? exn:fail:filesystem:errno-errno
struct:exn:fail:network exn:fail:network exn:fail:network?
struct:exn:fail:network:errno exn:fail:network:errno exn:fail:network:errno? exn:fail:network:errno-errno
struct:exn:fail:out-of-memory exn:fail:out-of-memory exn:fail:out-of-memory?
struct:exn:fail:unsupported exn:fail:unsupported exn:fail:unsupported?
struct:exn:fail:user exn:fail:user exn:fail:user?
struct:srcloc srcloc srcloc?
srcloc-source srcloc-line srcloc-column srcloc-position srcloc-span
struct:date date? date make-date
date-second date-minute date-hour date-day date-month date-year
date-week-day date-year-day date-dst? date-time-zone-offset
struct:date* date*? date* make-date*
date*-nanosecond date*-time-zone-name
struct:arity-at-least arity-at-least arity-at-least?
arity-at-least-value
prop:procedure
prop:method-arity-error
apply
procedure?
|#%app|
procedure-arity-includes?
procedure-arity
procedure-extract-target
raise-argument-error
raise-arguments-error
raise-result-error
raise-mismatch-error
raise-range-error
raise-arity-error
raise-type-error
raise-result-arity-error
make-struct-type-property
make-struct-type
struct-type-install-properties!
make-struct-field-accessor
make-struct-field-mutator
struct?
struct-type?
struct-type
struct-type-field-count
unsafe-struct-ref
unsafe-struct-set!
struct->vector
struct-type-transparent?
struct-transparent-type
prefab-key?
prefab-struct-key
prefab-key->struct-type
make-prefab-struct
prop:equal+hash
inspector?
inspector-superior?
eq-hash-code
eqv-hash-code
equal-hash-code
hash hasheqv hasheq
make-hash make-hasheqv make-hasheq
make-immutable-hash make-immutable-hasheqv make-immutable-hasheq
make-weak-hash make-weak-hasheq make-weak-hasheqv
hash-ref hash-set hash-set! hash-remove hash-remove!
hash-for-each hash-map hash-copy hash-clear!
hash-iterate-first hash-iterate-next
hash-iterate-key hash-iterate-value
hash-iterate-key+value hash-iterate-pair
unsafe-immutable-hash-iterate-first unsafe-immutable-hash-iterate-next
unsafe-immutable-hash-iterate-key unsafe-immutable-hash-iterate-value
unsafe-immutable-hash-iterate-key+value unsafe-immutable-hash-iterate-pair
unsafe-mutable-hash-iterate-first unsafe-mutable-hash-iterate-next
unsafe-mutable-hash-iterate-key unsafe-mutable-hash-iterate-value
unsafe-mutable-hash-iterate-key+value unsafe-mutable-hash-iterate-pair
unsafe-weak-hash-iterate-first unsafe-weak-hash-iterate-next
unsafe-weak-hash-iterate-key unsafe-weak-hash-iterate-value
unsafe-weak-hash-iterate-key+value unsafe-weak-hash-iterate-pair
hash? hash-eq? hash-equal? hash-eqv? hash-weak? immutable-hash?
hash-count
hash-keys-subset?
;; For intern tables:
weak-hash-ref-key
bytes bytes?
bytes-length
make-bytes
bytes-ref bytes-set!
bytes->list list->bytes
bytes->immutable-bytes
bytes-copy! bytes-copy
bytes=? bytes<? bytes>? bytes<=? bytes>=?
bytes-append
subbytes
string-copy!
substring
gensym
symbol-interned?
string->uninterned-symbol
string->unreadable-symbol
symbol->string
list?
vector-copy!
vector-immutable
vector->values
box-cas!
make-weak-box weak-box? weak-box-value
immutable?
keyword?
keyword->string
string->keyword
keyword<?
symbol<?
even? odd?
exact-integer?
exact-nonnegative-integer?
exact-positive-integer?
byte?
arithmetic-shift
random
pseudo-random-generator?
mpair? mcons mcar mcdr set-mcar! set-mcdr!
correlated?
correlated-source
correlated-line
correlated-column
correlated-position
correlated-span
correlated-e
correlated->datum
datum->correlated
correlated-property
correlated-property-symbol-keys
time-apply
current-inexact-milliseconds
current-milliseconds
current-gc-milliseconds
current-seconds
seconds->date
collect-garbage
current-memory-use
system-type
unsafe-car
unsafe-cdr
unsafe-list-tail
unsafe-list-ref
unsafe-fx+
unsafe-fx-
unsafe-fx*
unsafe-fxquotient
unsafe-fxremainder
unsafe-fxmodulo
unsafe-fxabs
unsafe-fxand
unsafe-fxior
unsafe-fxxor
unsafe-fxnot
unsafe-fxrshift
unsafe-fxlshift
unsafe-fx=
unsafe-fx<
unsafe-fx>
unsafe-fx>=
unsafe-fx<=
unsafe-fxmin
unsafe-fxmax
unsafe-fl+
unsafe-fl-
unsafe-fl*
unsafe-fl/
unsafe-flabs
unsafe-fl=
unsafe-fl<
unsafe-fl>
unsafe-fl>=
unsafe-fl<=
unsafe-flmin
unsafe-flmax
unsafe-flround
unsafe-flfloor
unsafe-flceiling
unsafe-fltruncate
unsafe-flsin
unsafe-flcos
unsafe-fltan
unsafe-flasin
unsafe-flacos
unsafe-flatan
unsafe-fllog
unsafe-flexp
unsafe-flsqrt
unsafe-flexpt
extflsin extflcos extfltan
extflasin extflacos extflatan
extfltruncate extflround extflfloor extflceiling
extflexp extfllog extflexpt
unsafe-vector-ref
unsafe-vector-set!
unsafe-vector*-ref
unsafe-vector*-set!
unsafe-vector-length
unsafe-vector*-length
unsafe-fxvector-ref
unsafe-fxvector-set!
unsafe-bytes-length
unsafe-bytes-ref
unsafe-bytes-set!
unsafe-undefined
check-not-unsafe-undefined
check-not-unsafe-undefined/assign
unsafe-string-length)
(import (chezpart)
(only (chezscheme)
format
fprintf
current-error-port
error)
(only (chezscheme csv7)
record-field-accessor
record-field-mutator))
(define none (chez:gensym "none"))
(define none2 (chez:gensym "none2"))
(include "core/constant.ss")
(include "core/hash-code.ss")
(include "core/symbol.ss")
(include "core/struct.ss")
(include "core/procedure.ss")
(include "core/hamt.ss")
(include "core/hash.ss")
(include "core/lock.ss")
(include "core/thread-cell.ss")
(include "core/begin0.ss")
(include "core/control.ss")
(include "core/interrupt.ss")
(include "core/parameter.ss")
(include "core/engine.ss")
(include "core/error.ss")
(include "core/bytes.ss")
(include "core/string.ss")
(include "core/list.ss")
(include "core/vector.ss")
(include "core/box.ss")
(include "core/immutable.ss")
(include "core/keyword.ss")
(include "core/mpair.ss")
(include "core/number.ss")
(include "core/correlated.ss")
(include "core/time.ss")
(include "core/memory.ss")
(include "core/system.ss")
(include "core/unsafe.ss")
(set-base-exception-handler!)
(set-primitive-applicables!)
(set-continuation-applicables!))