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


John Daschbach <d3h486@wd19518.emsl.pnl.gov> writes:

> I have been trying guile for some simple projects in place of scm.
> Mostly it is going well, but I have some questions about startup.
> I usually do something like the following
> 
>   gh_new_procedure2_0("thob", thob);
>   gh_new_procedure("scmode", scmode,3,0,0);  
>   gh_load("tidutil.scm");
>   gh_repl(argc,argv);
> 
> and then run in the repl, using C functions and scheme utility
> functions defined in tidutil.scm.  This is pretty tame guile use, and
> I have found it reasonably easy once I converted to using autoconf and
> libtool.  
> 
> My problem is that while most things loaded from tidutil.scm are
> visible in the repl, calls to use-modules seem to not be visible.  I
> do the following in tidutil.scm
> 
> (use-modules (ice-9 slib))
> (use-modules (ice-9 popen))
> 
> but nothing defined in these modules is visible in the repl.  I have
> to make these calls by hand in the repl.  All of my definitions in
> tidutil.scm are visible.  

Funny, came across a very similar problem today: before you enter the
repl, you're in root-module; when the repl is called you're moved to
guile-user, which won't be able to see anything that is used by the
root module. Dunno if there's a particularly nice way of avoiding this
besides doing a (use-modules ...) from the repl.

> Is there something simple I'm missing here?
> 
> -John
> 
> 

-- 
Greg

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