[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using R7RS symbol syntax in guile
From: |
Stefan Israelsson Tampe |
Subject: |
Re: Using R7RS symbol syntax in guile |
Date: |
Fri, 28 Apr 2017 17:36:04 +0200 |
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
>
>