From: sidhu1f <sidhu1f@gmail.com>
To: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
Cc: Guile user <guile-user@gnu.org>
Subject: Re: Using R7RS symbol syntax in guile
Date: Fri, 5 May 2017 19:02:22 +0530 [thread overview]
Message-ID: <CADhE+R-dkvhRMNQt9PNeq_A82w07LJcmWVqLF33Lw3y8KWmYTQ@mail.gmail.com> (raw)
In-Reply-To: <CAGua6m1_O_XuiVaiA0vNhnp-SmyeTFDU02Sf4c-3462mzporig@mail.gmail.com>
Thanks Stefan, what you say does give me a vague idea of what may be
happening, but delving into the guile ref. manual has not clarified
the picture, and its not important enough to try tackling the source
code directly. I'll stick to the standard guile symbol syntax
(#{...}#) for now :).
Regards
Reetinder
On Fri, Apr 28, 2017 at 9:06 PM, Stefan Israelsson Tampe
<stefan.itampe@gmail.com> wrote:
> Iäm unsure but if the first pass of the files is
> 1. read in form by form
> 2. macro expand
>
> then evaluated. If read-enable is a function it will not be executed at the
> macro expansion of the file. However for the use-module part
> guile will load the module at expansion time.
>
> Regards
> Stefan
>
>
> On Fri, Apr 28, 2017 at 4:14 PM, sidhu1f <sidhu1f@gmail.com> wrote:
>>
>> Could someone please explain the following seemingly counterintuitive
>> behavior regarding the r7rs syntax for symbols (symbol #foo is
>> expressed as |#foo| using r7rs syntax, more info in sec.6.6.6.6 of guile
>> ref. manual).
>>
>> When I invoke 'guile -s' on a file containing:
>>
>> (read-enable 'r7rs-symbols)
>> (display (symbol->string '|#foo|)) (newline)
>> (use-modules (test-r7rs))
>> (display (symbol->string '|#foo|)) (newline)
>>
>> guile 2.2 outputs:
>>
>> |#foo|
>> #foo
>>
>> Why the discrepancy? The module (test-r7rs) file contains:
>>
>> (define-module (test-r7rs))
>> (read-enable 'r7rs-symbols)
>>
>> Essentially, I'm asking why guile displays the symbol incorrectly (|#foo|)
>> in the first case but correctly (#foo) in the second.
>>
>> Thanks
>> Reetinder
>>
>
prev parent reply other threads:[~2017-05-05 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 14:14 Using R7RS symbol syntax in guile sidhu1f
2017-04-28 15:36 ` Stefan Israelsson Tampe
2017-05-05 13:32 ` sidhu1f [this message]
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=CADhE+R-dkvhRMNQt9PNeq_A82w07LJcmWVqLF33Lw3y8KWmYTQ@mail.gmail.com \
--to=sidhu1f@gmail.com \
--cc=guile-user@gnu.org \
--cc=stefan.itampe@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).