initial-packages.scm 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ; Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees. See file COPYING.
  2. ; Packages involved in building the initial system.
  3. ; Access to values from packages and structures
  4. (define-structure environments environments-interface
  5. (open scheme-level-2
  6. packages bindings meta-types
  7. fluids cells
  8. locations ; contents location-assigned?
  9. exceptions) ; error
  10. (files (rts env)))
  11. ; EVAL and LOAD
  12. (define-structures ((evaluation evaluation-interface)
  13. (load-filenames load-filenames-interface))
  14. (open scheme-level-2
  15. packages ;package-uid package->environment link!
  16. environments ;package-for-load
  17. compiler-envs ;bind-source-filename
  18. reading-forms ;read-forms $note-file-package
  19. syntactic ;scan-forms expand-forms
  20. compiler ;compile-forms
  21. closures ;make-closure
  22. vm-exposure ;invoke-closure
  23. features ;current-noise-port force-output
  24. exceptions fluids cells)
  25. (files (rts eval)))
  26. ; Scheme = scheme-level-2 plus EVAL and friends
  27. (define-module (make-scheme environments evaluation)
  28. (define-structure scheme scheme-interface
  29. (open scheme-level-2
  30. environments
  31. evaluation))
  32. scheme)
  33. ; Command processor.
  34. (define-module (make-mini-command scheme) ;copied from debug-packages.scm
  35. (define-structure mini-command (export command-processor)
  36. (open scheme
  37. ascii byte-vectors os-strings
  38. writing methods
  39. conditions exceptions handle
  40. i/o) ;current-error-port
  41. (files (debug mini-command)
  42. (env dispcond))) ; avoid having to include this generally
  43. mini-command)
  44. ; For building systems.
  45. (define-module (make-initial-system scheme command)
  46. (define-structure initial-system (export start)
  47. (open scheme
  48. command
  49. interfaces ;make-simple-interface
  50. packages ;make-simple-package
  51. environments ;with-interaction-environment, etc.
  52. usual-resumer)
  53. (files (env start)))
  54. initial-system)
  55. ; Utility to load packages following dependency links (OPEN and ACCESS)
  56. ;Cf. (link-initial-system) and Makefile
  57. (define-structure ensures-loaded (export ensure-loaded)
  58. (open scheme-level-2
  59. features ;current-noise-port
  60. packages ;package-uid package-clients
  61. packages-internal ;package-loaded? set-package-loaded?!
  62. scan-package ;collect-packages check-structure
  63. compile-packages ;compile-package
  64. closures ;make-closure
  65. vm-exposure ;invoke-closure
  66. environments ;with-interaction-environment
  67. weak ;walk-population
  68. )
  69. (files (env load-package)))
  70. ; Things needed by the expression generated by REIFY-STRUCTURES.
  71. (define-structure for-reification for-reification-interface
  72. (open scheme-level-1
  73. packages packages-internal
  74. exceptions
  75. meta-types ;sexp->type structure-type
  76. interfaces ;make-simple-interface
  77. bindings
  78. nodes ;get-operator operator? operator-type
  79. primops ;get-primop primop? primop-type
  80. usual-macros ;usual-transform
  81. inline ;inline-transform
  82. transforms ;make-transform/xxx transform? transform-type
  83. tables)
  84. (files (bcomp for-reify)))