guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Planning work


From: Rob Browning
Subject: Re: Planning work
Date: 28 Apr 2001 00:05:36 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

address@hidden (Thomas Bushnell, BSG) writes:

> Third, where can I find documentation (however scanty) on the guile
> module system?

Check the regular guile info pages to see what's there, but as a quick
summary:

To use a module:

  (use-modules (foo bar baz))

and make sure that there's a file named foo/bar/baz.scm somewhere in
your %load-path.  You can also use the GUILE_LOAD_PATH envt variable
to add items to %load-path.

In your module file, you need to declare your module:

  (define-module (foo bar baz))

and then you can start defining things normally and using other
modules.  To make some of your definitions public (so code that uses
your module will see them), just call (export some-symbol) or
(export-syntax some-symbol).

Finally, if you need to implement some of your module as a shared C
lib, first create your library with libtool, and then you can link and
initialize it at runtime with dynamic-link and dynamic-call (see the
guile info pages, and perhaps srfi/srfi-1{3,4}* for an example).

The old interface, where you could just automagically load the right
libfoo.so with (use-modules (foo)) is now deprecated, so avoid it.

Hope this helps.

-- 
Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930



reply via email to

[Prev in Thread] Current Thread [Next in Thread]