From 635a8b36b1dbed877fb8df752600870e9e1ee625 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 23 Apr 2010 15:58:08 +0200 Subject: [PATCH] deprecated %app shims use module-define-submodule! * module/ice-9/deprecated.scm (%app, app, modules): Don't use the module interface to provide %app shims, use module-define-submodule! directly to side-effect the root module. --- module/ice-9/deprecated.scm | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/module/ice-9/deprecated.scm b/module/ice-9/deprecated.scm index 5c43b2f6b..2ea99ba23 100644 --- a/module/ice-9/deprecated.scm +++ b/module/ice-9/deprecated.scm @@ -38,9 +38,8 @@ $tanh closure? %nil - @bind - %app - app)) + @bind)) + ;;;; Deprecated definitions. @@ -299,10 +298,12 @@ (lambda () (set! id old-v) ...))))))))) -;; Define (%app modules) -(define %app (make-module 31)) -(set-module-name! %app '(%app)) -(nested-define! %app '(modules) (resolve-module '() #f)) - -;; app aliases %app -(define app %app) +;; Define (%app) and (%app modules), and have (app) alias (%app). This +;; side-effects the-root-module, both to the submodules table and (through +;; module-define-submodule! above) the obarray. +;; +(let ((%app (make-module 31))) + (set-module-name! %app '(%app)) + (module-define-submodule! the-root-module '%app %app) + (module-define-submodule! the-root-module 'app %app) + (module-define-submodule! %app 'modules (resolve-module '() #f)))