guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Print backtraces for syntax errors too.


From: Maxime Devos
Subject: Re: [PATCH] Print backtraces for syntax errors too.
Date: Thu, 23 Feb 2023 20:04:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0

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: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]