From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Modules: first steps. Date: Mon, 16 Sep 2002 01:42:03 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <15749.6859.670744.98083@blauw.xs4all.nl> Reply-To: hanwen@cs.uu.nl NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1032133135 8611 127.0.0.1 (15 Sep 2002 23:38:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 15 Sep 2002 23:38:55 +0000 (UTC) Cc: jantien@xs4all.nl Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17qiyb-0002Ek-00 for ; Mon, 16 Sep 2002 01:38:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17qiyp-0006VG-00; Sun, 15 Sep 2002 19:39:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17qiyH-0006Rl-00 for guile-devel@gnu.org; Sun, 15 Sep 2002 19:38:33 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17qiyE-0006RN-00 for guile-devel@gnu.org; Sun, 15 Sep 2002 19:38:32 -0400 Original-Received: from smtpzilla1.xs4all.nl ([194.109.127.137]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17qiyE-0006RC-00 for guile-devel@gnu.org; Sun, 15 Sep 2002 19:38:30 -0400 Original-Received: from blauw.xs4all.nl (blauw.xs4all.nl [213.84.26.127]) by smtpzilla1.xs4all.nl (8.12.0/8.12.0) with ESMTP id g8FNcSAG053873; Mon, 16 Sep 2002 01:38:29 +0200 (CEST) Original-To: guile-devel@gnu.org X-Mailer: VM 7.05 under Emacs 21.2.1 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1352 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1352 As an ouverture to the Grand Hacking Branch of LilyPond, I'm converting some of the internal variable systems in Lily to Scheme anonymous modules. Some questions: * Why set-current-module ? I'd expect set-current-module! * How can I get a list of all the variables in a module (ok, I can figure that out by myself, but why is there no API entry for this?) * It would be nice if the C smob example also touched on module use. * I have in my code: void ly_init_guile () { SCM last_mod = scm_current_module (); scm_set_current_module (scm_c_resolve_module ("lily")); scm_c_use_module ("guile"); for (int i=scm_init_funcs_->size () ; i--;) (scm_init_funcs_->elem (i)) (); if (verbose_global_b) progress_indication ("\n"); scm_primitive_load_path (scm_makfrom0str ("lily.scm")); scm_set_current_module (last_mod); } The lily.scm file has (use-modules (ice-9 regex)) at the top. I get blauw:~/usr/src/savannah/lily/lilypond$ lilypond lstat(/home/hanwen/bin/usr) failed ... /home/hanwen/bin/usr: Onbekend bestand of map GNU LilyPond 1.7.0ERROR: no code for module (guile) How do I make the module that defines use-module available to the .scm file? * extern void scm_c_use_module (const char *name);. Why is there no scm_use_module (SCM)? For anonymous modules, the storing the name just to use it with scm_c_use_module seems silly, in particular if that function has to recover the SCM module object from the name again. -- Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel