From a061a2fa33c8c1710736d8425b6cb60502a3f9a1 Mon Sep 17 00:00:00 2001 From: Martin Gasbichler Date: Wed, 23 Apr 2003 08:30:47 +0000 Subject: [PATCH] Add rt-structure->environment. --- s48/module-system/README | 4 ++++ s48/module-system/interfaces.scm | 2 ++ s48/module-system/rt-module.scm | 3 +++ 3 files changed, 9 insertions(+) diff --git a/s48/module-system/README b/s48/module-system/README index 872b265..65c94e3 100644 --- a/s48/module-system/README +++ b/s48/module-system/README @@ -74,6 +74,10 @@ Evaluate body with the names from INTERFACE bound to the bindings provided by RT-STRUCTURE. +(rt-structure->environment rt-structure) --> environment + +Turns RT-STRUCTURE into an object suitable as second argument to EVAL. + diff --git a/s48/module-system/interfaces.scm b/s48/module-system/interfaces.scm index 8a3a24a..fee1f31 100644 --- a/s48/module-system/interfaces.scm +++ b/s48/module-system/interfaces.scm @@ -3,6 +3,7 @@ with-names-from-rt-structure) :syntax) reify-structure + rt-structure->environment load-structure load-config-file rt-structure-binding)) @@ -10,6 +11,7 @@ (define-interface rt-modules-core-interface (export interface-value-names reify-structure + rt-structure->environment load-config-file rt-structure-binding load-structure)) \ No newline at end of file diff --git a/s48/module-system/rt-module.scm b/s48/module-system/rt-module.scm index bd9f4e0..ae6faa2 100644 --- a/s48/module-system/rt-module.scm +++ b/s48/module-system/rt-module.scm @@ -42,6 +42,9 @@ (generic-lookup (rt-structure-meta-structure structure) name)))) +(define (rt-structure->environment rt-structure) + (structure-package (rt-structure-meta-structure rt-structure))) + (define (load-config-file file) (load file (config-package)))