Subject: Re: bug#54003: local-file after Guile update

From: Ludovic Courtès <[email-masked]>
Date: Tue, 15 Feb 2022 23:49:01 +0100

Hi,

Maxime Devos <[email-masked]> 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’.