guile-user
[Top][All Lists]
Advanced

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

problem with module system in guile 1.6.x and post versions


From: stefan
Subject: problem with module system in guile 1.6.x and post versions
Date: Sat, 31 May 2003 16:33:26 +0200 (CEST)

Hello Kevin!

Can you help me out with some knowledge on the new module system in Guile
1.6.x and post versions.  The issue is related to the GNU Serveez package
which I am maintaining.

The problem occurs to be:

 1. I have some symbols exported via scm_c_define_gsubr().  These I can
    use at top level, e.g. (serveez-version).
 2. The I have a 'test-suite.scm' file using

(define-module (test-suite))

(define (test)
 ...
 (serveez-version)
 ...
)

(export test)

 3. Then I use a 'binary-test.scm' where I

(use-modules (test-suite))
...
(test)

    This runs the (test) function which has been exported by the
    test-suite module... and fails using (serveez-version) be marked as
    'unbound-variable'.

This worked with Guile 1.4 versions.  Ok - I thought - play around with
the new module functions.  In the 'test-suite.scm' file added a procedure:

;; FIXME: Does this code import the public symbols of the guile-user
;; module into the current module?
(define (resolve-serveez-api)
  (module-for-each
   (lambda (symbol variable)
     (module-add! %module-public-interface symbol variable))
   (resolve-module '(guile-user))))

In fact I do get all of the api defined by scm_c_define_gsubr() but they
still not availabe in the test-suite module.

Can you please help us with that?

Thanks in advance,
        address@hidden





reply via email to

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