unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: "Ludovic Courtès" <ludo@gnu.org>,
	"Maxim Cournoyer" <maxim.cournoyer@gmail.com>
Cc: 54003@debbugs.gnu.org, Aleksandr Vityazev <avityazev@posteo.org>
Subject: bug#54003: local-file after Guile update
Date: Tue, 15 Feb 2022 21:56:09 +0100	[thread overview]
Message-ID: <695f30cb2a9857b3f616333b9a9fafb347f60061.camel@telenet.be> (raw)
In-Reply-To: <871r03zzky.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 731 bytes --]

Ludovic Courtès schreef op di 15-02-2022 om 20:42 [+0100]:
> The problem is that ‘read’ hash extensions (like those for #~ and #$)
> would so far return sexps with associated source properties, but
> psyntax
> in 3.0.8 ignores those source properties.

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.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-02-15 20:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 21:50 bug#54003: local-file after Guile update Aleksandr Vityazev
2022-02-15  8:21 ` Liliana Marie Prikler
2022-02-15 15:00 ` Ludovic Courtès
2022-02-15 15:57   ` Maxim Cournoyer
2022-02-15 19:42     ` Ludovic Courtès
2022-02-15 20:56       ` Maxime Devos [this message]
2022-02-15 22:49         ` Ludovic Courtès
2022-02-16 10:40           ` Ludovic Courtès
2022-02-16 16:00             ` Ludovic Courtès
2022-03-07 13:18               ` bug#54003: 'local-file' fails to resolve relative file names with Guile 3.0.8 Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=695f30cb2a9857b3f616333b9a9fafb347f60061.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=54003@debbugs.gnu.org \
    --cc=avityazev@posteo.org \
    --cc=ludo@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).