[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#54003: local-file after Guile update
From: |
Ludovic Courtès |
Subject: |
bug#54003: local-file after Guile update |
Date: |
Tue, 15 Feb 2022 23:49:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi,
Maxime Devos <maximedevos@telenet.be> skribis:
> Read hash extensions can return syntax objects. In a Guile 3.0.8 REPL:
>
> (define-module (hat))
> (define (hat s-exp)
> `#(hat ,s-exp))
>
> (read-hash-extend #\^
> (lambda (_ port)
> ;; Use 'read-syntax' instead of a combination of 'read' and
> ;; 'datum->syntax' for source properties.
> #`(hat '#,(read-syntax port))))
>
> #^(foo bar)
> $4 = #(hat (foo bar))
>
> Doing something like this in the hash extension for G-exps might work.
Yes, that’s one possible workaround, but then ‘read’ would find itself
returning syntax objects as well.
We have to see to what extent this is a problem in Guix proper; I think
it will at least break ‘guix style’ and related code.
Ludo’.