load.scm 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #| -*-Scheme-*-
  2. Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
  3. 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
  4. 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Massachusetts
  5. Institute of Technology
  6. This file is part of MIT/GNU Scheme.
  7. MIT/GNU Scheme 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. MIT/GNU Scheme is distributed in the hope that it will be useful, but
  12. WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with MIT/GNU Scheme; if not, write to the Free Software
  17. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
  18. USA.
  19. |#
  20. (load* "units" scmutils-base-environment)
  21. (load* "system" scmutils-base-environment)
  22. (load* "with-units" scmutils-base-environment)
  23. ;; FBE: since Chez's environments are not hierarchical, before adding
  24. ;; definitions we need to copy the definitions made up to now to the
  25. ;; 'child' environment.
  26. ;; Doesn't really work as 'SI-units' uses define-unit-system which
  27. ;; clobbers the 'scmutils-base-environment'.
  28. ;; (environment-update-from-child generic-environment scmutils-base-environment
  29. ;; '(define-unit-system define-derived-unit define-multiplier
  30. ;; define-additional-unit &unitless))
  31. ;;(load* "SI-units" generic-environment)
  32. (load* "fbe-SI-units" scmutils-base-environment)
  33. ;; (load* "hms-dms-radians" generic-environment)
  34. ;; (load* "convert" generic-environment)
  35. ;;; For display/print
  36. (environment-define scmutils-base-environment
  37. 'with-si-units->expression
  38. (lambda (x)
  39. (with-units->expression SI x)))
  40. ;;; In mechanics loader (load "constants" generic-environment)
  41. ;; FBE: I load it here in scmutils-base-environment
  42. (load* "fbe-constants" scmutils-base-environment) ; FBE