about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2023-08-08 23:40:45 -0500
committerCase Duckworth2023-08-08 23:40:45 -0500
commitd0fa34deb4fb9ec8952d6d1522ed19f8a1e4da2f (patch)
tree2e9d5dbbcf85064c7f68160d1814f59459aad263
parentProperly export utf8 (diff)
downloadchicanery-d0fa34deb4fb9ec8952d6d1522ed19f8a1e4da2f.tar.gz
chicanery-d0fa34deb4fb9ec8952d6d1522ed19f8a1e4da2f.zip
Rename scm to sld
-rw-r--r--chicanery.scm87
-rw-r--r--chicanery.sld392
2 files changed, 392 insertions, 87 deletions
diff --git a/chicanery.scm b/chicanery.scm deleted file mode 100644 index 12f5ab3..0000000 --- a/chicanery.scm +++ /dev/null
@@ -1,87 +0,0 @@
1;;; chicanery --- subtly breaking scheme expectations
2
3(import (r7rs))
4
5(define-library chicanery
6 ;; All the scheme stuff in one place
7 (import (scheme base))
8 (import (scheme case-lambda))
9 (import (scheme char))
10 (import (scheme complex))
11 (import (scheme cxr))
12 (import (scheme eval))
13 (import (scheme file))
14 (import (scheme inexact))
15 (import (scheme lazy))
16 (import (scheme load))
17 (import (scheme process-context))
18 (import (scheme read))
19 (import (scheme repl))
20 (import (scheme time))
21 (import (scheme write))
22 (import utf8)
23 (export * + - / <= < >= = > abs and append apply assoc assq assv begin
24 binary-port? boolean? boolean=? bytevector bytevector-append
25 bytevector-copy bytevector-copy! bytevector-length bytevector-u8-ref
26 bytevector-u8-set! bytevector? car cdr caar cadr cdar cddr
27 call-with-current-continuation call/cc call-with-port call-with-values
28 case ceiling char-ready? char->integer integer->char char=? char<?
29 char>? char<=? char>=? char? close-input-port close-output-port
30 close-port complex? cond cond-expand cons current-input-port
31 current-output-port current-error-port define define-record-type
32 define-syntax define-values denominator numerator do dynamic-wind
33 eof-object eof-object? eq? eqv? equal? error error-object-irritants
34 error-object-message error-object? even? odd? exact inexact
35 exact-integer-sqrt exact-integer? exact? inexact? exp expt features
36 file-error? floor floor/ floor-quotient floor-remainder
37 flush-output-port for-each gcd lcm get-output-bytevector
38 get-output-string guard if import import-for-syntax include include-ci
39 input-port-open? output-port-open? input-port? output-port? integer?
40 lambda length let let* letrec letrec* let-values let*-values let-syntax
41 letrec-syntax list list-copy list-ref list-set! list-tail list?
42 list->vector make-bytevector make-list make-parameter make-string
43 make-vector map max min member memq memv modulo remainder negative?
44 positive? newline not null? number->string string->number number?
45 open-input-bytevector open-output-bytevector open-input-string
46 open-output-string or pair? parameterize peek-char peek-u8 port?
47 procedure? quasiquote quote quotient remainder raise raise-continuable
48 rational? rationalize read-bytevector read-bytevector! read-char
49 read-error? read-line read-string read-u8 real? reverse round set!
50 set-car! set-cdr! square string string->list list->string string->utf8
51 utf8->string string->symbol symbol->string string->vector
52 string-append string-copy string-copy! string-fill! string-for-each
53 string-length string-map string-ref string-set! string=? string<?
54 string>? string<=? string>=? string? substring symbol=? symbol?
55 syntax-error syntax-rules textual-port? truncate truncate/
56 truncate-quotient truncate-remainder u8-ready? unless #;unquote
57 #;unquote-splicing values vector vector-append vector-copy vector-copy!
58 vector-fill! vector-for-each vector-length vector-map vector-ref
59 vector-set! vector->list vector->string vector? when
60 with-exception-handler write-bytevector write-char write-string
61 write-u8 zero?)
62 (export case-lambda)
63 (export char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=?
64 char-ci>? char-downcase char-foldcase char-lower-case? char-numeric?
65 char-upcase char-upper-case? char-whitespace? digit-value string-ci<=?
66 string-ci<? string-ci=? string-ci>=? string-ci>? string-downcase
67 string-foldcase string-upcase)
68 (export angle imag-part magnitude make-polar make-rectangular real-part)
69 (export caaaar caaadr caaar caadar caaddr caadr cadaar cadadr cadar caddar
70 cadddr caddr cdaaar cdaadr cdaar cdadar cdaddr cdadr cddaar cddadr
71 cddar cdddar cddddr cdddr)
72 (export environment eval)
73 (export call-with-input-file call-with-output-file delete-file file-exists?
74 open-binary-input-file open-binary-output-file open-input-file
75 open-output-file with-input-from-file with-output-to-file)
76 (export acos asin atan cos exp finite? infinite? log nan? sin sqrt tan)
77 (export delay delay-force force make-promise promise?)
78 (export load)
79 (export command-line emergency-exit exit get-environment-variable
80 get-environment-variables)
81 (export read)
82 (export interaction-environment)
83 (export current-jiffy current-second jiffies-per-second)
84 (export display write write-shared write-simple)
85
86 (include "chicanery.extras.scm"))
87
diff --git a/chicanery.sld b/chicanery.sld new file mode 100644 index 0000000..5c882d3 --- /dev/null +++ b/chicanery.sld
@@ -0,0 +1,392 @@
1;;; chicanery --- subtly breaking scheme expectations
2
3(cond-expand
4 (r7rs)
5 (chicken (import r7rs utf8))
6 (guile (install-r7rs!))
7 (gambit (include "chicanery#.scm"))
8 (else (display "Unsupported R7RS implementation.\n"
9 (current-error-port))))
10
11(define-library (chicanery)
12 ;; All the scheme stuff in one place
13 (import (except (scheme base)
14 map for-each append))
15 (import (rename (scheme base)
16 (map scheme/map)
17 (for-each scheme/for-each)
18 (append scheme/append)))
19 (import (scheme case-lambda))
20 (import (scheme char))
21 (import (scheme complex))
22 (import (scheme cxr))
23 (import (scheme eval))
24 (import (scheme file))
25 (import (scheme inexact))
26 (import (scheme lazy))
27 (import (scheme load))
28 (import (scheme process-context))
29 (import (scheme read))
30 (import (scheme repl))
31 (import (scheme time))
32 (import (scheme write))
33
34 (cond-expand
35 ;; Chicken doesn't build utf8 support in by default (at least <5)
36 (chicken (import (utf8)))
37 ;; Gambit has an extra `namespace' argument to `define-library' forms
38 (gambit (namespace ""))
39 (else))
40
41 (export *
42 +
43 -
44 /
45 <=
46 <
47 >=
48 =
49 >
50 abs
51 and
52 append
53 apply
54 assoc
55 assq
56 assv
57 begin
58 binary-port?
59 boolean?
60 boolean=?
61 bytevector
62 bytevector-append
63 bytevector-copy
64 bytevector-copy!
65 bytevector-length
66 bytevector-u8-ref
67 bytevector-u8-set!
68 bytevector?
69 car
70 cdr
71 caar
72 cadr
73 cdar
74 cddr
75 call-with-current-continuation
76 call/cc
77 call-with-port
78 call-with-values
79 case
80 ceiling
81 char-ready?
82 char->integer
83 integer->char
84 char=?
85 char<?
86 char>?
87 char<=?
88 char>=?
89 char?
90 close-input-port
91 close-output-port
92 close-port
93 complex?
94 cond
95 cond-expand
96 cons
97 current-input-port
98 current-output-port
99 current-error-port
100 define
101 define-record-type
102 define-syntax
103 define-values
104 denominator
105 numerator
106 do
107 dynamic-wind
108
109 eof-object
110 eof-object?
111 eq?
112 eqv?
113 equal?
114 error
115 error-object-irritants
116 error-object-message
117 error-object?
118 even?
119 odd?
120 exact
121 inexact
122 exact-integer-sqrt
123 exact-integer?
124 exact?
125 inexact?
126 expt
127 features
128 file-error?
129 floor
130 floor/
131 floor-quotient
132 floor-remainder
133 flush-output-port
134 for-each
135 gcd
136 lcm
137 get-output-bytevector
138 get-output-string
139 guard
140 if
141 ;; import
142 ;; import-for-syntax
143 ;; import-syntax
144 include
145 include-ci
146 input-port-open?
147 output-port-open?
148 input-port?
149 output-port?
150 integer?
151 lambda
152 length
153 let
154 let*
155 letrec
156 letrec*
157 let-values
158 let*-values
159 let-syntax
160 letrec-syntax
161 list
162 list-copy
163 list-ref
164 list-set!
165 list-tail
166 list?
167 list->vector
168 make-bytevector
169 make-list
170 make-parameter
171 make-string
172 make-vector
173 map
174 max
175 min
176 member
177 memq
178 memv
179 modulo
180 negative?
181 positive?
182 newline
183 not
184 null?
185 number->string
186 string->number
187 number?
188 open-input-bytevector
189 open-output-bytevector
190 open-input-string
191 open-output-string
192 or
193 pair?
194 parameterize
195 peek-char
196 peek-u8
197 port?
198 procedure?
199 quasiquote
200 quote
201 quotient
202 remainder
203 raise
204 raise-continuable
205 rational?
206 rationalize
207 read-bytevector
208 read-bytevector!
209 read-char
210 read-error?
211 read-line
212 read-string
213 read-u8
214 real?
215 reverse
216 round
217 set!
218 set-car!
219 set-cdr!
220 square
221 string
222 string->list
223 list->string
224 string->utf8
225 utf8->string
226 string->symbol
227 symbol->string
228 string->vector
229 string-append
230 string-copy
231 string-copy!
232 string-fill!
233 string-for-each
234 string-length
235 string-map
236 string-ref
237 string-set!
238 string=?
239 string<?
240 string>?
241 string<=?
242 string>=?
243 string?
244 substring
245 symbol=?
246 symbol?
247 syntax-error
248 syntax-rules
249 textual-port?
250 truncate
251 truncate/
252 truncate-quotient
253 truncate-remainder
254 u8-ready?
255 unless
256 ;;unquote
257 ;;unquote-splicing
258 values
259 vector
260 vector-append
261 vector-copy
262 vector-copy!
263 vector-fill!
264 vector-for-each
265 vector-length
266 vector-map
267 vector-ref
268 vector-set!
269 vector->list
270 vector->string
271 vector?
272 when
273 with-exception-handler
274 write-bytevector
275 write-char
276 write-string
277 write-u8
278 zero?
279 )
280 (export case-lambda)
281 (export char-alphabetic?
282 char-ci<=?
283 char-ci<?
284 char-ci=?
285 char-ci>=?
286 char-ci>?
287 char-downcase
288 char-foldcase
289 char-lower-case?
290 char-numeric?
291 char-upcase
292 char-upper-case?
293 char-whitespace?
294 digit-value
295 string-ci<=?
296 string-ci<?
297 string-ci=?
298 string-ci>=?
299 string-ci>?
300 string-downcase
301 string-foldcase
302 string-upcase)
303 (export angle
304 imag-part
305 magnitude
306 make-polar
307 make-rectangular
308 real-part)
309 (export caaaar
310 caaadr
311 caaar
312 caadar
313 caaddr
314 caadr
315 cadaar
316 cadadr
317 cadar
318 caddar
319 cadddr
320 caddr
321 cdaaar
322 cdaadr
323 cdaar
324 cdadar
325 cdaddr
326 cdadr
327 cddaar
328 cddadr
329 cddar
330 cdddar
331 cddddr
332 cdddr)
333 (export environment
334 eval)
335 (export call-with-input-file
336 call-with-output-file
337 delete-file
338 file-exists?
339 open-binary-input-file
340 open-binary-output-file
341 open-input-file
342 open-output-file
343 with-input-from-file
344 with-output-to-file)
345 (export acos
346 asin
347 atan
348 cos
349 exp
350 finite?
351 infinite?
352 log
353 nan?
354 sin
355 sqrt
356 tan)
357 (export delay
358 delay-force
359 force
360 make-promise
361 promise?)
362 (export load)
363 (export command-line
364 emergency-exit
365 exit
366 get-environment-variable
367 get-environment-variables)
368 (export read)
369 (export interaction-environment)
370 (export current-jiffy
371 current-second
372 jiffies-per-second)
373 (export display
374 write
375 write-shared
376 write-simple)
377
378 ;; Extras
379 (export list-map
380 list-for-each
381 list-append
382 ref
383 copy
384 atom?
385 read-port
386 read-port-chunk-size
387 defined?
388 displayed ->string
389 written
390 print)
391
392 (include "chicanery.extras.scm"))