home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / cref / triv.con < prev    next >
Text File  |  1999-01-02  |  4KB  |  93 lines

  1. #| -*-Scheme-*-
  2.  
  3. $Id: triv.con,v 1.5 1999/01/02 06:11:34 cph Exp $
  4.  
  5. Copyright (c) 1989-1999 Massachusetts Institute of Technology
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or (at
  10. your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful, but
  13. WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. |#
  21.  
  22. ;;;; "Trivial" constructor needed to bootstrap cref.
  23.  
  24. (declare (usual-integrations))
  25.  
  26. (package/add-child!
  27.  (find-package '())
  28.  'cross-reference
  29.  (in-package (package/environment (find-package '()))
  30.    (let ((cref/generate-all)
  31.      (cref/generate-constructors)
  32.      (cref/generate-cref)
  33.      (cref/generate-cref-unusual)
  34.      (cref/generate-trivial-constructor))
  35.      (the-environment))))
  36. (let ((source (package/environment (find-package '( cross-reference))))
  37.       (destination (package/environment (find-package '()))))
  38.   (environment-link-name destination source 'cref/generate-all)
  39.   (environment-link-name destination source 'cref/generate-constructors)
  40.   (environment-link-name destination source 'cref/generate-cref)
  41.   (environment-link-name destination source 'cref/generate-cref-unusual)
  42.   (environment-link-name destination source 'cref/generate-trivial-constructor))
  43.  
  44. (package/add-child!
  45.  (find-package '(cross-reference))
  46.  'analyze-file
  47.  (in-package (package/environment (find-package '(cross-reference)))
  48.    (let ((analyze-file))
  49.      (the-environment))))
  50. (let ((source (package/environment (find-package '(cross-reference analyze-file))))
  51.       (destination (package/environment (find-package '(cross-reference)))))
  52.   (environment-link-name destination source 'analyze-file))
  53.  
  54. (package/add-child!
  55.  (find-package '(cross-reference))
  56.  'constructor
  57.  (in-package (package/environment (find-package '(cross-reference)))
  58.    (let ((construct-constructor)
  59.      (construct-loader))
  60.      (the-environment))))
  61. (let ((source (package/environment (find-package '(cross-reference constructor))))
  62.       (destination (package/environment (find-package '(cross-reference)))))
  63.   (environment-link-name destination source 'construct-constructor)
  64.   (environment-link-name destination source 'construct-loader))
  65.  
  66. (package/add-child!
  67.  (find-package '(cross-reference))
  68.  'formatter
  69.  (in-package (package/environment (find-package '(cross-reference)))
  70.    (let ((format-packages)
  71.      (format-packages-unusual))
  72.      (the-environment))))
  73. (let ((source (package/environment (find-package '(cross-reference formatter))))
  74.       (destination (package/environment (find-package '(cross-reference)))))
  75.   (environment-link-name destination source 'format-packages)
  76.   (environment-link-name destination source 'format-packages-unusual)
  77.   (environment-link-name source
  78.              (package/environment (find-package '(runtime scode)))
  79.              'symbol-name))
  80.  
  81. (package/add-child!
  82.  (find-package '(cross-reference))
  83.  'reader
  84.  (in-package (package/environment (find-package '(cross-reference)))
  85.    (let ((read-file-analyses!)
  86.      (read-package-model)
  87.      (resolve-references!))
  88.      (the-environment))))
  89. (let ((source (package/environment (find-package '(cross-reference reader))))
  90.       (destination (package/environment (find-package '(cross-reference)))))
  91.   (environment-link-name destination source 'read-file-analyses!)
  92.   (environment-link-name destination source 'read-package-model)
  93.   (environment-link-name destination source 'resolve-references!))