packages.scm 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. ; Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees. See file COPYING.
  2. ; Meta-modules: the big picture.
  3. ; Various implementations of Primitive Scheme.
  4. (define-structure low-structures low-structures-interface
  5. (open meta-module-system the-interfaces)
  6. (files low-packages))
  7. (define-structure debug-low-structures low-structures-interface
  8. (open meta-module-system the-interfaces
  9. ;; built-in-structures
  10. )
  11. (files (alt low-packages)))
  12. ; Usual Scheme 48 run-time system.
  13. (define (make-run-time low-structures)
  14. (structures (run-time-structures-interface
  15. run-time-internals-structures-interface
  16. features-structures-interface)
  17. (open meta-module-system the-interfaces
  18. low-structures)
  19. (files rts-packages)))
  20. ; Alternatives to the usual Scheme 48 run-time system.
  21. (define-structure alt-features-structures features-structures-interface
  22. (open meta-module-system the-interfaces)
  23. (files (alt features-packages)))
  24. (define-structure cheat-features-structures features-structures-interface
  25. (open meta-module-system the-interfaces)
  26. (begin (define-structures ((ascii ascii-interface)
  27. (bitwise bitwise-interface)
  28. (code-vectors code-vectors-interface)
  29. (features features-interface)
  30. (records records-interface)
  31. (record-types record-types-interface)
  32. (low-exceptions low-exceptions-interface))
  33. ;; Assumes use of FLATLOAD. The implementations of these
  34. ;; structures will become available via some miracle, e.g.
  35. ;; a command ",open low-exceptions ... code-vectors" or an
  36. ;; explicit LOAD of something. Cf. the rule for
  37. ;; link/linker.image in the Makefile.
  38. )))
  39. (define-module (make-alt-run-time features-structures)
  40. (structures (low-structures-interface
  41. run-time-structures-interface)
  42. (open meta-module-system the-interfaces
  43. features-structures)
  44. (files alt-packages
  45. (alt low-packages))))
  46. ; Byte-code compiler and related things.
  47. (define-module (make-compiler-structures run-time-structures
  48. features-structures)
  49. (define-structure compiler-structures compiler-structures-interface
  50. (open meta-module-system the-interfaces
  51. run-time-structures
  52. features-structures)
  53. (files comp-packages))
  54. compiler-structures)
  55. ; The initial system (initial.image). Cf. the rule for initial.image
  56. ; in the Makefile.
  57. (define (make-initial-structures low-structures
  58. run-time-structures
  59. run-time-internals-structures
  60. features-structures
  61. compiler-structures)
  62. (structure initial-structures-interface
  63. (open meta-module-system the-interfaces
  64. low-structures ;Cf. desirable-structures
  65. run-time-structures
  66. features-structures
  67. run-time-internals-structures
  68. compiler-structures)
  69. (files initial-packages)))
  70. ; Small systems.
  71. (define-structure (make-debug-structures low-structures
  72. run-time-structures
  73. run-time-internals-structures
  74. features-structures
  75. initial-structures)
  76. (structure debug-structures-interface
  77. (open meta-module-system the-interfaces
  78. low-structures
  79. run-time-structures
  80. run-time-internals-structures
  81. features-structures
  82. initial-structures)
  83. (files debug-packages)))
  84. ; Static linker.
  85. (define-module (make-linker-structures features-structures
  86. run-time-structures
  87. compiler-structures)
  88. (define-structure linker-structures linker-structures-interface
  89. (open meta-module-system the-interfaces
  90. features-structures
  91. run-time-structures
  92. compiler-structures)
  93. (files link-packages))
  94. linker-structures)
  95. ; The following definition of THE-INTERFACES assumes that we're
  96. ; "flatloading." If we were really using the module system, then its
  97. ; interface would have to include all of the interfaces defined in
  98. ; interfaces.scm, and it would need a (files interfaces) clause.
  99. (define-structure the-interfaces the-interfaces-interface
  100. (open )
  101. ;; (files interfaces)
  102. )
  103. (define-interface the-interfaces-interface
  104. (export scheme-level-0-interface
  105. primitives-interface
  106. ;; ... etc. etc. ad nauseum
  107. for-reification-interface))
  108. ; This definition of META-MODULE-SYSTEM assumes that we're flatloading.
  109. ; If we weren't, it would have to be
  110. ; (def meta-module-system module-system)
  111. ; instead.
  112. (define-structure meta-module-system (export ) (open )) ;Kludge
  113. ; --------------------
  114. ; Particular assemblies:
  115. ; The usual run-time system (for initial.image, etc.).
  116. (def run-time-structures run-time-internals-structures features-structures
  117. (make-run-time low-structures))
  118. ; The byte-code compiler as constituted for initial.image and friends.
  119. (def compiler-structures
  120. (make-compiler-structures run-time-structures
  121. features-structures))
  122. ; The initial system made in the usual way.
  123. (def initial-structures
  124. (make-initial-structures low-structures
  125. run-time-structures
  126. run-time-internals-structures
  127. features-structures
  128. compiler-structures))
  129. ; Debug systems.
  130. (def debug-structures
  131. (make-debug-structures low-structures
  132. run-time-structures
  133. run-time-internals-structures
  134. features-structures
  135. initial-structures))
  136. ; The usual development environment (scheme48.image).
  137. (define-structure usual-structures (export (usual-features :structure))
  138. (open meta-module-system
  139. run-time-structures
  140. compiler-structures
  141. initial-structures
  142. (make-linker-structures features-structures
  143. run-time-structures
  144. compiler-structures))
  145. (files ;; more-interfaces, when not flatloading
  146. ;; (sort interfaces), when not flatloading
  147. (sort packages)
  148. env-packages
  149. more-packages))
  150. ; The linker running in a random Scheme system (Lucid, Scheme->C, or
  151. ; old version of Scheme 48). If running in Scheme 48, this becomes
  152. ; link/linker.image.
  153. (def alt-low-structures alt-run-time-structures
  154. (make-alt-run-time cheat-features-structures))
  155. (def linker-structures
  156. (make-linker-structures cheat-features-structures
  157. alt-run-time-structures
  158. (make-compiler-structures cheat-features-structures
  159. alt-run-time-structures)))
  160. ; --------------------
  161. ; Meta-interfaces.
  162. ; These are ignored by FLATLOAD, but DESIRABLE-STRUCTURES (in
  163. ; initial.scm) extracts the list of structures to be reified from
  164. ; them.
  165. (define-interface features-structures-interface
  166. (export ((ascii
  167. bitwise
  168. code-vectors
  169. features
  170. records)
  171. :structure)))
  172. (define-interface low-structures-interface
  173. (export ((all-operators
  174. ascii
  175. bitwise
  176. byte-vectors
  177. cells
  178. code-vectors
  179. features
  180. records
  181. cells
  182. channels
  183. closures
  184. code-quotation
  185. escapes
  186. locations
  187. loopholes
  188. low-level
  189. ports
  190. primitives
  191. low-proposals
  192. scheme-level-0
  193. shared-bindings
  194. signal-conditions
  195. silly
  196. source-file-names
  197. structure-refs
  198. debug-messages
  199. syntax-transformers
  200. unicode
  201. vm-exposure
  202. write-images)
  203. :structure)))
  204. (define-interface run-time-structures-interface
  205. (export ((architecture
  206. channel-i/o
  207. condvars
  208. define-record-types
  209. encodings
  210. enum-case
  211. enumerated
  212. fluids
  213. os-strings
  214. proposals
  215. queues
  216. record-types
  217. scheduler
  218. scheme-level-1
  219. scheme-level-2
  220. set-text-procedures
  221. templates
  222. text-codecs
  223. threads
  224. util
  225. vm-data
  226. weak)
  227. :structure)))
  228. (define-interface run-time-internals-structures-interface
  229. (export ((channel-ports
  230. conditions
  231. continuations
  232. ;; escapes
  233. exceptions
  234. exceptions-internal
  235. fluids-internal
  236. handle
  237. i/o
  238. i/o-internal
  239. methods
  240. meta-methods
  241. interrupts
  242. external-events
  243. low-level
  244. more-types
  245. number-i/o
  246. ;; primitives
  247. queues-internal
  248. reading
  249. records-internal
  250. root-scheduler
  251. session-data
  252. syntax-rules-apply
  253. threads-internal
  254. vm-exceptions
  255. usual-resumer
  256. ;; silly
  257. ;; structure-refs
  258. ;; vm-exposure
  259. wind
  260. writing)
  261. :structure)))
  262. (define-interface compiler-structures-interface
  263. (export ((analysis
  264. bc-generation
  265. bindings
  266. compiler
  267. compiler-envs
  268. compile-packages
  269. debug-data
  270. debug-data-internal
  271. defpackage
  272. filenames
  273. flat-environments
  274. frames
  275. inline
  276. meta-types
  277. interfaces
  278. module-system
  279. names
  280. nodes
  281. optimizer
  282. packages
  283. packages-internal
  284. primops
  285. reading-forms
  286. reconstruction
  287. segments
  288. scan-package
  289. syntactic
  290. strong
  291. tables
  292. transforms
  293. types
  294. undefined
  295. usual-macros)
  296. :structure)))
  297. (define-interface initial-structures-interface
  298. (export ((environments
  299. load-filenames
  300. evaluation
  301. ensures-loaded
  302. ;; for-reification is in there, but shouldn't get reified.
  303. )
  304. :structure)
  305. ((make-scheme
  306. make-mini-command
  307. make-initial-system)
  308. :procedure)))
  309. ; Initial + usual (scheme48.image).
  310. (define-interface linker-structures-interface
  311. (export ((analysis
  312. debuginfo
  313. expander
  314. flatloading
  315. linker
  316. link-config
  317. loadc
  318. reification
  319. usages)
  320. :structure)))
  321. (define debug-structures-interface
  322. (export ((mini-eval
  323. mini-environments
  324. mini-scheme
  325. little-system
  326. mini-for-reification
  327. mini-packages
  328. mini-system
  329. run
  330. medium-scheme
  331. medium-system)
  332. :structure)
  333. mini-eval
  334. mini-environments))
  335. ; Must list all the packages in the various package files that are to
  336. ; be visible in the command processor's config package.
  337. (define-interface more-structures-interface
  338. (export ((more-structures
  339. usual-features
  340. arrays
  341. assembler
  342. assembling
  343. general-tables
  344. bigbit
  345. bignums ratnums recnums floatnums
  346. build
  347. callback
  348. code-quote ; compatibility to earlier versions
  349. command-levels
  350. command-processor
  351. command-state
  352. usual-commands
  353. compact-tables
  354. constant-tables
  355. conditions
  356. c-system-function
  357. debugging
  358. define-record-types
  359. defrecord
  360. destructuring
  361. disassembler
  362. disclosers
  363. display-conditions
  364. dump/restore
  365. dynamic-externals
  366. enum-case
  367. enum-sets enum-sets-internal
  368. extended-numbers
  369. extended-ports
  370. externals
  371. external-calls
  372. finite-types
  373. floatnums
  374. formats
  375. inspector
  376. inspector-internal
  377. inversion-lists
  378. list-interfaces
  379. load-dynamic-externals
  380. locks
  381. lu-decompositions
  382. masks
  383. mask-types
  384. mvlet
  385. nondeterminism
  386. net-addresses
  387. net-sockets
  388. os-time
  389. package-commands-internal
  390. package-mutation
  391. parse-bytecode
  392. placeholders
  393. pp
  394. previews
  395. profiler
  396. profile-commands
  397. profiler-instrumentation
  398. profiler-internals
  399. queues
  400. shared-objects
  401. tconc-queues
  402. time
  403. tlc-tables
  404. random
  405. receiving
  406. reduce
  407. search-trees
  408. signals
  409. sockets
  410. unicode-char-maps
  411. delete-neighbor-duplicates
  412. binary-searches
  413. sorted
  414. list-merge-sort
  415. vector-merge-sort
  416. vector-heap-sort
  417. vector-insertion-sort
  418. vector-quick-sort vector-quick-sort3
  419. sorting
  420. sort
  421. sparse-vectors
  422. reinitializers
  423. signals
  424. spatial
  425. strong
  426. text-codec-utils
  427. traverse
  428. udp-sockets
  429. unicode-normalizations
  430. value-pipes
  431. variable-argument-lists
  432. big-scheme
  433. big-util
  434. ;; From link-packages.scm:
  435. analysis
  436. debuginfo
  437. expander
  438. flatloading
  439. linker
  440. link-config
  441. reification ;?
  442. shadowing
  443. ;; Compatibility
  444. record table
  445. ; CML packages (see scheme/cml/packages.scm)
  446. rendezvous
  447. rendezvous-channels
  448. rendezvous-async-channels
  449. rendezvous-placeholders
  450. rendezvous-jars
  451. rendezvous-time
  452. ; do-it-yourself
  453. make-rendezvous
  454. trans-ids
  455. r5rs
  456. ; R6RS packages
  457. r6rs-base-comparisons
  458. r6rs-bitwise
  459. r6rs-conditions
  460. r6rs-records-procedural
  461. r6rs-records-inspection
  462. r6rs-records-internal
  463. r6rs-records-commands
  464. r6rs-records-syntactic
  465. r6rs-records-syntactic-internal
  466. r6rs-unicode
  467. r6rs-lists
  468. r6rs-enums
  469. r6rs-sorting
  470. r6rs-reader
  471. r6rs-reader-command
  472. r6rs-reader-internals
  473. r6rs-equal
  474. r6rs-control
  475. r6rs-bytevectors
  476. r6rs-hashtables
  477. ; POSIX packages (see scheme/posix/packages.scm)
  478. posix-files
  479. posix-time
  480. posix-users
  481. posix-process-data
  482. posix-platform-names
  483. posix-processes
  484. posix-regexps
  485. posix-i/o
  486. posix-errnos
  487. posix-syslog
  488. regexps regexps-internal
  489. posix
  490. ; SRFI packages
  491. srfi-1 srfi-2 srfi-4 srfi-5 srfi-6 srfi-7 srfi-8 srfi-9
  492. srfi-11 srfi-13 srfi-14 srfi-16 srfi-17 srfi-19
  493. srfi-23 srfi-25 srfi-26 srfi-27 srfi-28
  494. srfi-31 srfi-34 srfi-37
  495. srfi-39 srfi-40 srfi-42 srfi-43 srfi-45
  496. srfi-60 srfi-61 srfi-62 srfi-63 srfi-66 srfi-67
  497. srfi-71 srfi-74 srfi-78 srfi-95
  498. libscheme48
  499. test-suites
  500. matchers
  501. )
  502. :structure)
  503. ((define-signature define-package) :syntax)))