From: Maxime Devos <maximedevos@telenet.be>
To: "Ludovic Courtès" <ludo@gnu.org>, guile-devel@gnu.org
Subject: Re: [PATCH] Print backtraces for syntax errors too.
Date: Thu, 23 Feb 2023 20:04:22 +0100 [thread overview]
Message-ID: <2b3c2687-3a3c-ab40-3c73-055a3bf443f5@telenet.be> (raw)
In-Reply-To: <87pma07gsm.fsf@gnu.org>
[-- Attachment #1.1.1: Type: text/plain, Size: 1126 bytes --]
On 23-02-2023 12:38, Ludovic Courtès wrote:
> Do you have a simple reproducer and a before/after comparison showing
> what Guile prints?
Simpler reproducer:
(define-syntax syntax-stuff-twice
(lambda (s)
(define (f x)
(syntax-case x ()
(#:this #''this)
(#:that #''that)))
(define (g y)
(syntax-case y ()
(#:cat #''cat)
(#:dog #''dog)))
(syntax-case s ()
((_)
;; Let's compute some syntax, for some reason.
;; (Hence, the syntax doesn't have line information
;; that might be an acceptable alternative to
;; a backtrace.)
(let ((x (datum->syntax #f "foo"))
(y (datum->syntax #f "bar")))
#`(list #,(f x) #,(g y)))))))
(syntax-stuff-twice 'this #:cat) ; <- L21
;; Before:
;; .../reproducer.scm:21:0: source expression failed to match any
pattern in form (quote this)
;;
;; After: ??? the same thing! Looks like another patch is needed.
Looks like the patch I sent doesn't actually accomplish what it was
supposed to solve ...
Greetings,
Maxime.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2023-02-23 19:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 15:59 [PATCH] Print backtraces for syntax errors too Maxime Devos
2023-02-23 11:38 ` Ludovic Courtès
2023-02-23 19:04 ` Maxime Devos [this message]
2023-02-23 19:10 ` Maxime Devos
2023-02-23 19:27 ` Maxime Devos
2023-02-24 15:48 ` Ludovic Courtès
2023-02-24 23:38 ` Maxime Devos
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://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2b3c2687-3a3c-ab40-3c73-055a3bf443f5@telenet.be \
--to=maximedevos@telenet.be \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/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.
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).