packages.scm 13 KB

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