unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Modules
@ 2010-12-08 11:45 Marek Kubica
  2010-12-08 18:11 ` Modules Andreas Rottmann
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Marek Kubica @ 2010-12-08 11:45 UTC (permalink / raw)
  To: guile-user

Hi,

I tried executing the modules example:

$ cd guile-git/examples/module
$ guile -s main

(whereas guile = 1.9.13)

but I get an error:

;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling main
;;; WARNING: compilation of main failed:
;;; key misc-error, throw_args (#f "~A ~S" ("no code for
module" (module-0)) #f) Backtrace:
In ice-9/boot-9.scm:
 170: 17 [catch #t #<catch-closure 1b750e0> ...]
In unknown file:
   ?: 16 [catch-closure]
In ice-9/boot-9.scm:
  62: 15 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 389: 14 [eval # #]
In ice-9/boot-9.scm:
1840: 13 [save-module-excursion #<procedure 1cac990 at
ice-9/boot-9.scm:1854:3 ()>] 1149: 12 [load "main" #f]
1047: 11 [%start-stack load-stack ...]
1052: 10 [#<procedure 22c2fc0 ()>]
In unknown file:
   ?: 9 [primitive-load "main"]
In ice-9/eval.scm:
 458: 8 [#<procedure 1a838c0 at ice-9/eval.scm:452:4 (exp)> #]
In ice-9/psyntax.scm:
 908: 7 [chi-top-sequence ((#(syntax-object let # ...) (#) (# #) ...))
() ...] 1159: 6 [chi-top (#(syntax-object let # ...) (#) (# #) ...)
() ...] In ice-9/eval.scm:
 374: 5 [eval # ()]
In ice-9/boot-9.scm:
2389: 4 [process-define-module ((main) #:filename "main" ...)]
2307: 3 [resolve-interface (module-0) #:select ...]
In unknown file:
   ?: 2 [scm-error misc-error #f "~A ~S" ("no code for
module" (module-0)) #f] In ice-9/boot-9.scm:
 115: 1 [#<procedure 1c698c0 at ice-9/boot-9.scm:110:6 (thrown-k .
args)> misc-error ...] In unknown file:
   ?: 0 [catch-closure misc-error #f "~A ~S" ("no code for
module" (module-0)) #f]

ERROR: In procedure catch-closure:
ERROR: no code for module (module-0)

Is there a way to add the current directory to the search path? I think
this should be default, just like in Python, otherwise creating modules
is a really big hassle.

regards,
Marek



^ permalink raw reply	[flat|nested] 23+ messages in thread
* modules
@ 2004-03-21  5:40 Ian Zimmerman
  2004-03-21 14:47 ` modules Andreas Rottmann
  2004-03-21 21:29 ` modules Thien-Thi Nguyen
  0 siblings, 2 replies; 23+ messages in thread
From: Ian Zimmerman @ 2004-03-21  5:40 UTC (permalink / raw)



Hi, I am fairly new to guile.  So far I am just exploring it as just
another Lisp/Scheme, and writing toy programs in Scheme.

In that connection, I have two questions related to the module system.

1/ How can I customize a module during loading?  In Emacs Lisp, 
I can either:

a) set a global variable, for instance 

(setq foo-module:bar 'baz)

prior to loading a library "foo-module".  If that library itself does

(defvar foo-module:bar)

it picks up the value that was previously set.  But in Scheme, set! only
works on variables that have already been define'd, and a define creates
a new variable totally unrelated to the existing value.

b) use eval-after-load; is there any equivalent in guile?

2/ The documentation for eval says the second argument can be a module.
But how can I get an actual module object?  I tried

(eval foo '(ice-9 rw))

but I get 

Wrong type argument in position 2 (expecting MODULEP): (ice-9 rw)
ABORT: (wrong-type-arg)

Neither the section on using modules or the section on defining them seems
to list any API for getting a module "thing".

-- 
Nothing can be explained to a stone.
Or to a stoned person, either.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


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

end of thread, other threads:[~2011-02-13 19:05 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 11:45 Modules Marek Kubica
2010-12-08 18:11 ` Modules Andreas Rottmann
2010-12-09  1:19 ` Modules Nala Ginrut
2011-01-28 16:26 ` Modules Andy Wingo
2011-01-29 12:13   ` Modules Marek Kubica
2011-01-29 13:08     ` Modules Neil Jerram
2011-01-29 13:18       ` Modules Neil Jerram
2011-01-29 17:04     ` Modules Andy Wingo
2011-01-29 18:37       ` Modules Marek Kubica
2011-01-29 23:17       ` Modules Neil Jerram
2011-01-30 10:13         ` Modules Thien-Thi Nguyen
2011-01-30 11:42         ` Modules Andy Wingo
2011-02-13 19:05           ` Modules Andy Wingo
2011-01-29 17:07     ` Modules Andy Wingo
2011-01-29 18:40       ` Modules Marek Kubica
2011-01-29 23:35       ` Modules Neil Jerram
2011-02-01 21:43         ` Modules Andy Wingo
2011-02-02 14:43         ` Modules Jon Wilson
  -- strict thread matches above, loose matches on Subject: below --
2004-03-21  5:40 modules Ian Zimmerman
2004-03-21 14:47 ` modules Andreas Rottmann
2004-03-22 18:05   ` modules Ian Zimmerman
2004-03-23 16:05     ` modules Robert Uhl
2004-03-21 21:29 ` modules Thien-Thi Nguyen

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).