guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using R7RS symbol syntax in guile


From: sidhu1f
Subject: Re: Using R7RS symbol syntax in guile
Date: Fri, 5 May 2017 19:02:22 +0530

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
<address@hidden> 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 <address@hidden> 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
>>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]