From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gubinelli Massimiliano Newsgroups: gmane.lisp.guile.user Subject: Re: Problem with modules in Guile 2.0 Date: Wed, 7 Mar 2012 23:52:57 +0100 Message-ID: <79B073AF-B3A8-46E0-A047-C4F5686E167E@gmail.com> References: <54183C89-DE93-417E-84EC-5C454E56EE35@gmail.com> <87eht4yww5.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1331160799 20287 80.91.229.3 (7 Mar 2012 22:53:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Mar 2012 22:53:19 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Mar 07 23:53:18 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S5PjS-0006jb-5Q for guile-user@m.gmane.org; Wed, 07 Mar 2012 23:53:18 +0100 Original-Received: from localhost ([::1]:47068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5PjR-0006bi-BA for guile-user@m.gmane.org; Wed, 07 Mar 2012 17:53:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5PjL-0006bS-N1 for guile-user@gnu.org; Wed, 07 Mar 2012 17:53:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5PjJ-0004Am-Bv for guile-user@gnu.org; Wed, 07 Mar 2012 17:53:11 -0500 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:62295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5PjJ-0004AO-2W for guile-user@gnu.org; Wed, 07 Mar 2012 17:53:09 -0500 Original-Received: by wgbdr1 with SMTP id dr1so3676316wgb.30 for ; Wed, 07 Mar 2012 14:53:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=pJHR74kL3SHGZ4Xpk5neLQdfB7zzs1anJVtTsSy1eaw=; b=HCrOtir78sk+qjbnSVGqtisunkyeF6944n90BBeip6YbHgAtGbhoxux9+B9kJldpd/ UNoMSZW74F1rSeOuyinlsf4+3Uy/OXT8FT8Zu2haPGRy2AxUvb0YBjp5TfApW0/ezCVk TZsASyLlAOV3MJT0y3PaJkgT1qykoPunRA/ENm4ols51tiy9wyPzpckiddgM+MM9z+FJ XlC4Mah4vJS53QnXONU/um3mhC8DvCdHK+eEDsd1zSsbbc1LwZkIKmKW2RxbVMlGBzW+ T3GsSRtygBlUKZVRkf4kZUc+d4q+gXKn33gFgd43xpVITo6wLtz+/UMBONPWF1dG8nEq FPDg== Original-Received: by 10.180.79.135 with SMTP id j7mr26403423wix.19.1331160785726; Wed, 07 Mar 2012 14:53:05 -0800 (PST) Original-Received: from [10.1.10.20] ([196.203.29.245]) by mx.google.com with ESMTPS id w10sm87473039wiy.3.2012.03.07.14.53.02 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Mar 2012 14:53:04 -0800 (PST) In-Reply-To: <87eht4yww5.fsf@pobox.com> X-Mailer: Apple Mail (2.1257) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9322 Archived-At: Thanks for the prompt reply to both of you. However the proposed = solution do not work in my case. After implementing the begin-for-syntax = alternative I now get scheme@(guile-user)> (load "main.scm") ;;; compiling /Users/mgubi/t/build-64-guile-2.0/test-modules/main.scm ;;; note: source file = /Users/mgubi/t/build-64-guile-2.0/test-modules/test-modules.scm ;;; newer than compiled = /Users/mgubi/.cache/guile/ccache/2.0-LE-8-2.0/Users/mgubi/t/build-64-guile= -2.0/test-modules/test-modules.scm.go ;;; compiling = /Users/mgubi/t/build-64-guile-2.0/test-modules/test-modules.scm ;;; = /Users/mgubi/t/build-64-guile-2.0/test-modules/test-modules.scm:15:34: = warning: possibly unbound variable `compile-interface-spec' ;;; = /Users/mgubi/t/build-64-guile-2.0/test-modules/test-modules.scm:32:11: = warning: possibly unbound variable `:use' ;;; = /Users/mgubi/t/build-64-guile-2.0/test-modules/test-modules.scm:33:11: = warning: possibly unbound variable `:inherit' ;;; = /Users/mgubi/t/build-64-guile-2.0/test-modules/test-modules.scm:34:11: = warning: possibly unbound variable `:export' ;;; compiled = /Users/mgubi/.cache/guile/ccache/2.0-LE-8-2.0/Users/mgubi/t/build-64-guile= -2.0/test-modules/test-modules.scm.go ;;; WARNING: compilation of = /Users/mgubi/t/build-64-guile-2.0/test-modules/main.scm failed: ;;; ERROR: No variable named %module-public-interface in # ERROR: In procedure scm-error: ERROR: No variable named %module-public-interface in # Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]>=20 if I understand correctly this backtrace it seems that the module is not = completely loaded at compile time and there is not public interface = available. How can I force the evaluation of the loaded modules in order = to get a list of exported symbols? Best massimiliano On Mar 7, 2012, at 9:32 PM, Andy Wingo wrote: > Hi! >=20 > Mark gave great answers; I just wanted to give one more option: >=20 > On Tue 06 Mar 2012 22:48, Gubinelli Massimiliano = writes: >=20 >> (load "test-modules.scm") >=20 > Add a definition first: >=20 > (cond-expand > (guile-2 > (define-syntax-rule (begin-for-syntax form ...) > (eval-when (load compile eval) (begin form ...)))) > (else > (define begin-for-syntax begin))) >=20 > Then: >=20 > (begin-for-syntax > (load "test-modules.scm")) >=20 > Regards, >=20 > Andy > --=20 > http://wingolog.org/ On Mar 7, 2012, at 9:32 PM, Andy Wingo wrote: > Hi! >=20 > Mark gave great answers; I just wanted to give one more option: >=20 > On Tue 06 Mar 2012 22:48, Gubinelli Massimiliano = writes: >=20 >> (load "test-modules.scm") >=20 > Add a definition first: >=20 > (cond-expand > (guile-2 > (define-syntax-rule (begin-for-syntax form ...) > (eval-when (load compile eval) (begin form ...)))) > (else > (define begin-for-syntax begin))) >=20 > Then: >=20 > (begin-for-syntax > (load "test-modules.scm")) >=20 > Regards, >=20 > Andy > --=20 > http://wingolog.org/