packages.scm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  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. (simple-signals signals-interface))
  33. ;; Assumes use of FLATLOAD. The implementations of these
  34. ;; structures will become available via some miracle, e.g.
  35. ;; a command ",open simple-signals ... 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. env-packages
  147. ;; (sort interfaces), when not flatloading
  148. (sort 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. simple-signals)
  172. :structure)))
  173. (define-interface low-structures-interface
  174. (export ((all-operators
  175. ascii
  176. bitwise
  177. byte-vectors
  178. cells
  179. code-vectors
  180. features
  181. records
  182. simple-signals
  183. cells
  184. channels
  185. closures
  186. code-quote
  187. escapes
  188. locations
  189. loopholes
  190. low-level
  191. ports
  192. primitives
  193. low-proposals
  194. scheme-level-0
  195. shared-bindings
  196. silly
  197. source-file-names
  198. structure-refs
  199. debug-messages
  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. simple-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. reading
  248. records-internal
  249. root-scheduler
  250. session-data
  251. threads-internal
  252. vm-exceptions
  253. usual-resumer
  254. ;; silly
  255. ;; structure-refs
  256. ;; vm-exposure
  257. wind
  258. writing)
  259. :structure)))
  260. (define-interface compiler-structures-interface
  261. (export ((analysis
  262. bc-generation
  263. bindings
  264. compiler
  265. compiler-envs
  266. compile-packages
  267. debug-data
  268. debug-data-internal
  269. defpackage
  270. filenames
  271. flat-environments
  272. frames
  273. inline
  274. meta-types
  275. interfaces
  276. module-system
  277. names
  278. nodes
  279. optimizer
  280. packages
  281. packages-internal
  282. primops
  283. reading-forms
  284. reconstruction
  285. segments
  286. scan-package
  287. syntactic
  288. strong
  289. tables
  290. transforms
  291. types
  292. undefined
  293. usual-macros)
  294. :structure)))
  295. (define-interface initial-structures-interface
  296. (export ((environments
  297. evaluation
  298. ensures-loaded
  299. ;; for-reification is in there, but shouldn't get reified.
  300. )
  301. :structure)
  302. ((make-scheme
  303. make-mini-command
  304. make-initial-system)
  305. :procedure)))
  306. ; Initial + usual (scheme48.image).
  307. (define-interface linker-structures-interface
  308. (export ((analysis
  309. debuginfo
  310. expander
  311. flatloading
  312. linker
  313. link-config
  314. loadc
  315. reification
  316. usages)
  317. :structure)))
  318. (define debug-structures-interface
  319. (export ((mini-eval
  320. mini-environments
  321. mini-scheme
  322. little-system
  323. mini-for-reification
  324. mini-packages
  325. mini-system
  326. run
  327. medium-scheme
  328. medium-system)
  329. :structure)
  330. mini-eval
  331. mini-environments))
  332. ; Must list all the packages defined in this file that are to be
  333. ; visible in the command processor's config package.
  334. (define-interface more-structures-interface
  335. (export ((more-structures
  336. usual-features
  337. arrays
  338. assembler
  339. assembling
  340. general-tables
  341. bigbit
  342. bignums ratnums recnums floatnums
  343. build
  344. callback
  345. command-levels
  346. command-processor
  347. command-state
  348. compact-tables
  349. conditions
  350. c-system-function
  351. debugging
  352. define-record-types
  353. defrecord
  354. destructuring
  355. disassembler
  356. disclosers
  357. display-conditions
  358. dump/restore
  359. dynamic-externals
  360. enum-case
  361. enum-sets
  362. extended-numbers
  363. extended-ports
  364. externals
  365. external-calls
  366. finite-types
  367. floatnums
  368. formats
  369. i/o-conditions
  370. inspector
  371. inspector-internal
  372. inversion-lists
  373. list-interfaces
  374. load-dynamic-externals
  375. locks
  376. lu-decompositions
  377. masks
  378. mask-types
  379. mvlet
  380. nondeterminism
  381. package-commands-internal
  382. package-mutation
  383. parse-bytecode
  384. placeholders
  385. pp
  386. ;profile
  387. queues
  388. shared-objects
  389. time
  390. random
  391. receiving
  392. reduce
  393. search-trees
  394. signals
  395. sockets
  396. unicode-char-maps
  397. delete-neighbor-duplicates
  398. binary-searches
  399. sorted
  400. list-merge-sort
  401. vector-merge-sort
  402. vector-heap-sort
  403. vector-insertion-sort
  404. sorting
  405. sort
  406. sparse-vectors
  407. reinitializers
  408. spatial
  409. strong
  410. text-codec-utils
  411. traverse
  412. udp-sockets
  413. unicode-normalizations
  414. r6rs-unicode
  415. value-pipes
  416. variable-argument-lists
  417. big-scheme
  418. big-util
  419. ;; From link-packages.scm:
  420. analysis
  421. debuginfo
  422. expander
  423. flatloading
  424. linker
  425. link-config
  426. reification ;?
  427. shadowing
  428. ;; Compatibility
  429. record table
  430. ; CML packages (see scheme/cml/packages.scm)
  431. rendezvous
  432. rendezvous-channels
  433. rendezvous-async-channels
  434. rendezvous-placeholders
  435. rendezvous-jars
  436. rendezvous-time
  437. ; do-it-yourself
  438. make-rendezvous
  439. trans-ids
  440. ; POSIX packages (see scheme/posix/packages.scm)
  441. posix-files
  442. posix-time
  443. posix-users
  444. posix-process-data
  445. posix-processes
  446. posix-regexps
  447. posix-i/o
  448. regexps regexps-internal
  449. posix
  450. ; SRFI packages
  451. srfi-1 srfi-2 srfi-4 srfi-5 srfi-6 srfi-7 srfi-8 srfi-9
  452. srfi-11 srfi-13 srfi-14 srfi-16 srfi-17 srfi-19
  453. srfi-23 srfi-25 srfi-26 srfi-27 srfi-28
  454. srfi-31 srfi-34 srfi-35 srfi-36 srfi-37
  455. srfi-39 srfi-40 srfi-42 srfi-43 srfi-45
  456. srfi-60 srfi-61 srfi-63 srfi-66 srfi-67
  457. srfi-71 srfi-74 srfi-78
  458. test-suites
  459. )
  460. :structure)
  461. ((define-signature define-package) :syntax)))