Hi,

Maxime Devos <maximede...@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’.



Reply via email to