From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: include can't work Date: Mon, 18 Nov 2013 13:13:01 -0500 Message-ID: <87txf960k2.fsf@netris.org> References: <1384501247.11916.8.camel@Renee-desktop.suse> <87txfb90m2.fsf@netris.org> <8738mv8hlg.fsf@netris.org> <1384761343.11916.63.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1384798426 13228 80.91.229.3 (18 Nov 2013 18:13:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Nov 2013 18:13:46 +0000 (UTC) Cc: guile-devel To: Nala Ginrut Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Nov 18 19:13:50 2013 Return-path: Envelope-to: guile-devel@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 1ViTKV-0007Du-Az for guile-devel@m.gmane.org; Mon, 18 Nov 2013 19:13:47 +0100 Original-Received: from localhost ([::1]:45337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViTKU-0007QZ-Py for guile-devel@m.gmane.org; Mon, 18 Nov 2013 13:13:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViTKL-0007QI-SG for guile-devel@gnu.org; Mon, 18 Nov 2013 13:13:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ViTKE-0005a4-I7 for guile-devel@gnu.org; Mon, 18 Nov 2013 13:13:37 -0500 Original-Received: from world.peace.net ([96.39.62.75]:48281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViTKE-0005Zy-E7 for guile-devel@gnu.org; Mon, 18 Nov 2013 13:13:30 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1ViTK7-0007DD-TP; Mon, 18 Nov 2013 13:13:24 -0500 In-Reply-To: <1384761343.11916.63.camel@Renee-desktop.suse> (Nala Ginrut's message of "Mon, 18 Nov 2013 15:55:43 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16752 Archived-At: Nala Ginrut writes: > On Sun, 2013-11-17 at 05:09 -0500, Mark H Weaver wrote: >> Guile's 'include' also supports relative paths if the (include "...") >> form is found within a file, or more generally, if it was read from a >> port that had its filename set. >> >> Please tell us more about what you were doing, so that we can find out >> what's going wrong. >> > > I think it's a common situation. I planed to include b.scm into a.scm, > like: > -----------------a.scm-------------------- > (define-syntax define-primitive > ......) > (include "b.scm") > -----------------end---------------------- > > And let b.scm contains all the primitives definitions, which is > explicitly for later extending. > -----------------b.scm------------------- > (define-primitive %halt 0 0) > (define-primitive pair? 1 1) > (define-primitive cons 2 2) > ...... > ------------------end-------------------- This should work if "a.scm" and "b.scm" are files in the same directory. It works for me. I'm unable to reproduce the problem you're seeing. Can you help me to reproduce it? How are you loading "a.scm"? Thanks, Mark