unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile module system problem
@ 2009-01-20 10:18 Panicz Maciej Godek
  2009-01-20 12:15 ` Neil Jerram
  0 siblings, 1 reply; 7+ messages in thread
From: Panicz Maciej Godek @ 2009-01-20 10:18 UTC (permalink / raw)
  To: guile-user

Hi, I've been trying to move some of my code into
loadable guile modules. I made a directory "modules"
in my project tree and moved the module in there.

I ran into some problems. Here's how I load the
module:
(set! %load-path (cons "." %load-path))
(load-module (modules goose))
At this point, guile signals an error (unbound variable).

Here's how the module looks like:
(define-module (modules goose)
  :use-module (oop goops)
  :replace (slot-ref))

(define slot-ref (make-procedure-with-setter slot-ref slot-set!))

And at this point guile complains that slot-ref is unbound.

I've been trying several combinations, like inserting
(use-modules (oop goops)) before the redefinition,
but the error seems to be imvunerable to this.

Regards
M




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-05 22:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 10:18 Guile module system problem Panicz Maciej Godek
2009-01-20 12:15 ` Neil Jerram
2009-01-20 13:07   ` Panicz Maciej Godek
2009-01-20 16:52     ` Panicz Maciej Godek
2009-01-21 16:55       ` Ludovic Courtès
2009-01-21 17:51         ` Panicz Maciej Godek
2009-02-05 22:18           ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).