This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Small troubles in startup


"Daschbach, John L" <John.Daschbach@pnl.gov> writes:

> Thanks.
> 
> This seems like it could be a problem in many cases since many core scheme
> functions are now implemented in the module system, e.g. open-pipe.  This means
> that a user doesn't see a real scheme until modules are loaded, and this has to
> be done by hand.  Calls to use-modules in the .gule file are not visible.  

Actually, they are... um, for normal guile invocations, anyway ;).
A very hackish way to fix this:

Changelog:

1999-12-01  Greg Harvey  <Greg.Harvey@thezone.net>

	* boot-9.scm (top-repl): make guile-user use any modules that
	guile (the-root-module) has used.

diff -c -r1.196 boot-9.scm
*** boot-9.scm	1999/11/19 18:16:19	1.196
--- boot-9.scm	1999/12/01 05:36:30
***************
*** 2804,2809 ****
--- 2804,2814 ----
        (define-module (guile-user) :use-module (ice-9 threads)))
    (if (memq 'regex *features*)
        (define-module (guile-user) :use-module (ice-9 regex)))
+   (let ((mod (resolve-module '(guile-user))))
+     (for-each (lambda (x) 
+                 (if (not (memq x (module-uses mod)))
+                     (set-module-uses! mod (cons x (module-uses mod)))))
+               (module-uses (resolve-module '(guile)))))
  
    (let ((old-handlers #f)
  	(signals (if (provided? 'posix)


> I have not yet found a syntax in the documentation that describes how to access
> variables defined in these calls to use-modules.  The TeXinfo doc's seem way out
> of date on this issue.  The obvious, to me a least, syntax using CL or Perl
> concepts 'root-module:open-pipe' or 'root-module::open-pipe' don't work.   

(module-ref the-root-module 'open-pipe) 


-- 
Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]