File: packages.scm

package info (click to toggle)
scheme48 1.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 18,232 kB
  • sloc: lisp: 88,907; ansic: 87,519; sh: 3,224; makefile: 771
file content (588 lines) | stat: -rw-r--r-- 13,369 bytes parent folder | download | duplicates (4)
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
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
; Part of Scheme 48 1.9.  See file COPYING for notices and license.

; Authors: Richard Kelsey, Jonathan Rees, Mike Sperber, Michael Zabka,
; Robert Ransom, Marcus Crestani, Ivan Shmakov, Martin Gasbichler,
; David van Horn, Harald Glab-Phlak


; Meta-modules: the big picture.

; Various implementations of Primitive Scheme.

(define-structure low-structures low-structures-interface
  (open meta-module-system the-interfaces)
  (files low-packages))

(define-structure debug-low-structures low-structures-interface
  (open meta-module-system the-interfaces
	;; built-in-structures
	)
  (files (alt low-packages)))


; Usual Scheme 48 run-time system.

(define (make-run-time low-structures)
  (structures (run-time-structures-interface
	       run-time-internals-structures-interface
	       features-structures-interface)
    (open meta-module-system the-interfaces
	  low-structures)
    (files rts-packages)))


; Alternatives to the usual Scheme 48 run-time system.

(define-structure alt-features-structures features-structures-interface
  (open meta-module-system the-interfaces)
  (files (alt features-packages)))

(define-structure cheat-features-structures features-structures-interface
  (open meta-module-system the-interfaces)
  (begin (define-structures ((ascii ascii-interface)
			     (bitwise bitwise-interface)
			     (code-vectors code-vectors-interface)
			     (features features-interface)
			     (records records-interface)
			     (record-types record-types-interface)
			     (low-exceptions low-exceptions-interface))
	   ;; Assumes use of FLATLOAD.  The implementations of these
	   ;; structures will become available via some miracle, e.g.
	   ;; a command ",open low-exceptions ... code-vectors" or an
	   ;; explicit LOAD of something.  Cf. the rule for
	   ;; link/linker.image in the Makefile.
	   )))

(define-module (make-alt-run-time features-structures)
  (structures (low-structures-interface
	       run-time-structures-interface)
    (open meta-module-system the-interfaces
	  features-structures)
    (files alt-packages
	   (alt low-packages))))


; Byte-code compiler and related things.

(define-module (make-compiler-structures run-time-structures
					 features-structures)

  (define-structure compiler-structures compiler-structures-interface
    (open meta-module-system the-interfaces
	  run-time-structures
	  features-structures)
    (files comp-packages))

  compiler-structures)


; The initial system (initial.image).  Cf. the rule for initial.image
; in the Makefile.

(define (make-initial-structures low-structures
				 run-time-structures
				 run-time-internals-structures
				 features-structures
				 compiler-structures)
  (structure initial-structures-interface
    (open meta-module-system the-interfaces
	  low-structures		;Cf. desirable-structures
	  run-time-structures
	  features-structures
	  run-time-internals-structures
	  compiler-structures)
    (files initial-packages)))


; Small systems.

(define-structure (make-debug-structures low-structures
					 run-time-structures
					 run-time-internals-structures
					 features-structures
					 initial-structures)
  (structure debug-structures-interface
    (open meta-module-system the-interfaces
	  low-structures
	  run-time-structures
	  run-time-internals-structures
	  features-structures
	  initial-structures)
    (files debug-packages)))


; Static linker.

(define-module (make-linker-structures features-structures
				       run-time-structures
				       compiler-structures)

  (define-structure linker-structures linker-structures-interface
    (open meta-module-system the-interfaces
	  features-structures
	  run-time-structures
	  compiler-structures)
    (files link-packages))

  linker-structures)



; The following definition of THE-INTERFACES assumes that we're
; "flatloading."  If we were really using the module system, then its
; interface would have to include all of the interfaces defined in
; interfaces.scm, and it would need a (files interfaces) clause.

(define-structure the-interfaces the-interfaces-interface
  (open )
  ;; (files interfaces)
  )
(define-interface the-interfaces-interface
  (export scheme-level-0-interface
	  primitives-interface
	  ;; ... etc. etc. ad nauseum
	  for-reification-interface))

; This definition of META-MODULE-SYSTEM assumes that we're flatloading.
; If we weren't, it would have to be
;   (def meta-module-system module-system)
; instead.

(define-structure meta-module-system (export ) (open ))  ;Kludge



; --------------------
; Particular assemblies:

; The usual run-time system (for initial.image, etc.).

(def run-time-structures run-time-internals-structures features-structures
  (make-run-time low-structures))


; The byte-code compiler as constituted for initial.image and friends.

(def compiler-structures
  (make-compiler-structures run-time-structures
			    features-structures))


; The initial system made in the usual way.

(def initial-structures
  (make-initial-structures low-structures
			   run-time-structures
			   run-time-internals-structures
			   features-structures
			   compiler-structures))


; Debug systems.

(def debug-structures
  (make-debug-structures low-structures
			 run-time-structures
			 run-time-internals-structures
			 features-structures
			 initial-structures))


; The usual development environment (scheme48.image).

(define-structure usual-structures (export (usual-features :structure))
  (open meta-module-system
	run-time-structures
	compiler-structures
	initial-structures
	(make-linker-structures features-structures
				run-time-structures
				compiler-structures))
  (files ;; more-interfaces, when not flatloading
	 ;; (sort interfaces), when not flatloading
	 (sort packages)
         env-packages
	 more-packages))


; The linker running in a random Scheme system (Lucid, Scheme->C, or
; old version of Scheme 48).  If running in Scheme 48, this becomes
; link/linker.image.

(def alt-low-structures alt-run-time-structures
  (make-alt-run-time cheat-features-structures))

(def linker-structures
  (make-linker-structures cheat-features-structures
			  alt-run-time-structures
			  (make-compiler-structures cheat-features-structures
						    alt-run-time-structures)))



; --------------------
; Meta-interfaces.
; These are ignored by FLATLOAD, but DESIRABLE-STRUCTURES (in
; initial.scm) extracts the list of structures to be reified from
; them.

(define-interface features-structures-interface
  (export ((ascii
	    bitwise
	    code-vectors
	    features
	    records)
	   :structure)))

(define-interface low-structures-interface
  (export ((all-operators
	    ascii
	    bitwise
	    byte-vectors
	    cells
	    code-vectors
	    features
	    records
	    cells
	    channels
	    closures
	    code-quotation
	    escapes
	    locations
	    loopholes
	    low-level
	    ports
	    primitives
	    low-proposals
	    scheme-level-0
	    shared-bindings
	    signal-conditions
	    silly
	    source-file-names
	    structure-refs
	    debug-messages
	    syntax-transformers
	    unicode
	    vm-exposure
	    write-images)
	   :structure)))

(define-interface run-time-structures-interface
  (export ((architecture
	    channel-i/o
	    condvars
	    define-record-types
	    encodings
	    enum-case
	    enumerated
	    fluids
	    os-strings
	    proposals
	    queues
	    record-types
	    scheduler
	    scheme-level-1
	    scheme-level-2
	    set-text-procedures
	    templates
	    text-codecs
	    threads
	    util
	    vm-data
	    weak)
	   :structure)))

(define-interface run-time-internals-structures-interface
  (export ((channel-ports
	    conditions
	    continuations
	    ;; escapes
	    exceptions
	    exceptions-internal
	    fluids-internal
	    handle
	    i/o
	    i/o-internal
	    methods
	    meta-methods
	    interrupts
	    external-events
	    low-level
	    more-types
	    number-i/o
	    ;; primitives
	    queues-internal
	    reading
	    records-internal
	    root-scheduler
	    session-data
	    syntax-rules-apply
	    threads-internal
	    vm-exceptions
	    usual-resumer
	    ;; silly
	    ;; structure-refs
	    ;; vm-exposure
	    wind
	    writing)
	   :structure)))
  
(define-interface compiler-structures-interface
  (export ((analysis
	    bc-generation
	    bindings
	    compiler
	    compiler-envs
	    compile-packages
	    debug-data
	    debug-data-internal
	    defpackage
	    filenames
	    flat-environments
	    frames
	    inline
	    meta-types
	    interfaces
	    module-system
	    names
	    nodes
	    optimizer
	    packages
	    packages-internal
	    primops
	    reading-forms
	    reconstruction
	    segments
	    scan-package
	    syntactic
	    strong
	    tables
	    transforms
	    types
	    undefined
	    usual-macros)
	   :structure)))

(define-interface initial-structures-interface
  (export ((environments
	    load-filenames
	    evaluation
	    ensures-loaded
	    ;; for-reification is in there, but shouldn't get reified.
	    )
	   :structure)
	  ((make-scheme
	    make-mini-command
	    make-initial-system)
	   :procedure)))


; Initial + usual (scheme48.image).

(define-interface linker-structures-interface
  (export ((analysis
	    debuginfo
	    expander
	    flatloading
	    linker
	    link-config
	    loadc
	    reification
	    usages)
	   :structure)))

(define debug-structures-interface
  (export ((mini-eval
	    mini-environments
	    mini-scheme
	    little-system
	    mini-for-reification
	    mini-packages
	    mini-system
	    run
	    medium-scheme
	    medium-system)
	   :structure)
	  mini-eval
	  mini-environments))

; Must list all the packages in the various package files that are to
; be visible in the command processor's config package.

(define-interface more-structures-interface
  (export ((more-structures
	    usual-features
	    arrays
	    assembler
	    assembling
	    general-tables
	    bigbit
	    bignums ratnums recnums floatnums
	    build
	    callback
	    code-quote ; compatibility to earlier versions
	    command-levels
	    command-processor
	    command-state
	    usual-commands
	    compact-tables
	    constant-tables
	    conditions
	    c-system-function
	    debugging
	    define-record-types
	    defrecord
	    destructuring
	    disassembler
	    disclosers
	    display-conditions
	    dump/restore
	    dynamic-externals
	    enum-case
	    enum-sets enum-sets-internal
	    extended-numbers
	    extended-ports
	    externals
	    external-calls
	    finite-types
	    floatnums
	    formats
	    inspector
	    inspector-internal
	    inversion-lists
	    list-interfaces
	    load-dynamic-externals
	    locks
	    lu-decompositions
	    masks
	    mask-types
	    mvlet
	    nondeterminism
	    net-addresses
	    net-sockets
            os-time
	    package-commands-internal
	    package-mutation
	    parse-bytecode
	    placeholders
	    pp
	    previews
	    profiler
	    profile-commands
	    profiler-instrumentation
	    profiler-internals
	    queues
	    shared-objects
	    tconc-queues
	    time
	    tlc-tables
	    random
	    receiving
	    reduce
	    search-trees
	    signals
	    sockets
	    unicode-char-maps

	    delete-neighbor-duplicates
	    binary-searches
	    sorted
	    list-merge-sort
	    vector-merge-sort
	    vector-heap-sort
	    vector-insertion-sort
	    vector-quick-sort vector-quick-sort3
	    sorting
	    sort

	    sparse-vectors
	    reinitializers
	    signals
	    spatial
	    strong
	    text-codec-utils
	    traverse
	    udp-sockets
	    unicode-normalizations
	    value-pipes
	    variable-argument-lists

	    big-scheme
	    big-util
	    ;; From link-packages.scm:
	    analysis
	    debuginfo
	    expander
	    flatloading
	    linker
	    link-config
	    reification			;?
	    shadowing
	    ;; Compatibility
	    record table

	    ; CML packages (see scheme/cml/packages.scm)
	    rendezvous
	    rendezvous-channels
	    rendezvous-async-channels
	    rendezvous-placeholders
	    rendezvous-jars
	    rendezvous-time
	    ; do-it-yourself
	    make-rendezvous
	    trans-ids

	    r5rs

	    ; R6RS packages

	    r6rs-base-comparisons
	    r6rs-bitwise
	    r6rs-conditions
	    r6rs-records-procedural
	    r6rs-records-inspection
	    r6rs-records-internal
	    r6rs-records-commands
	    r6rs-records-syntactic
	    r6rs-records-syntactic-internal
	    r6rs-unicode
	    r6rs-lists
	    r6rs-enums
	    r6rs-sorting
	    r6rs-reader
	    r6rs-reader-command
	    r6rs-reader-internals
            r6rs-equal
            r6rs-control
	    r6rs-bytevectors
	    r6rs-hashtables

	    ; POSIX packages (see scheme/posix/packages.scm)
	    posix-files
	    posix-time
	    posix-users
	    posix-process-data
	    posix-platform-names
	    posix-processes
	    posix-regexps
	    posix-i/o
	    posix-errnos
	    posix-syslog
	    regexps regexps-internal
	    posix

	    ; SRFI packages
	    srfi-1 srfi-2 srfi-4 srfi-5 srfi-6 srfi-7 srfi-8 srfi-9
	    srfi-11 srfi-13 srfi-14 srfi-16 srfi-17 srfi-19
	    srfi-23 srfi-25 srfi-26 srfi-27 srfi-28
	    srfi-31 srfi-34 srfi-37
	    srfi-39 srfi-40 srfi-42 srfi-43 srfi-45
            srfi-60 srfi-61 srfi-62 srfi-63 srfi-66 srfi-67
	    srfi-71 srfi-74 srfi-78 srfi-95

            libscheme48
	    test-suites
	    matchers
	    )
	   :structure)
	  ((define-signature define-package) :syntax)))