From: Mark H Weaver <mhw@netris.org>
To: Nala Ginrut <nalaginrut@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: include can't work
Date: Mon, 18 Nov 2013 13:13:01 -0500 [thread overview]
Message-ID: <87txf960k2.fsf@netris.org> (raw)
In-Reply-To: <1384761343.11916.63.camel@Renee-desktop.suse> (Nala Ginrut's message of "Mon, 18 Nov 2013 15:55:43 +0800")
Nala Ginrut <nalaginrut@gmail.com> 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
next prev parent reply other threads:[~2013-11-18 18:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 7:40 include can't work Nala Ginrut
2013-11-17 3:19 ` Mark H Weaver
2013-11-17 4:33 ` Mark H Weaver
2013-11-17 21:09 ` Ludovic Courtès
2013-11-18 6:14 ` Mark H Weaver
2013-11-17 8:24 ` Nala Ginrut
2013-11-17 10:09 ` Mark H Weaver
2013-11-18 7:55 ` Nala Ginrut
2013-11-18 18:13 ` Mark H Weaver [this message]
2013-11-18 18:15 ` Mark H Weaver
2013-11-19 3:06 ` Nala Ginrut
[not found] <mailman.171.1384534862.25052.guile-devel@gnu.org>
2013-11-15 17:12 ` Daniel Llorens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87txf960k2.fsf@netris.org \
--to=mhw@netris.org \
--cc=guile-devel@gnu.org \
--cc=nalaginrut@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).