guile-devel
[Top][All Lists]
Advanced

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

Re: Are source locations broken?


From: Maxime Devos
Subject: Re: Are source locations broken?
Date: Fri, 25 Mar 2022 21:27:18 +0100
User-agent: Evolution 3.38.3-1

Maxime Devos schreef op vr 25-03-2022 om 21:22 [+0100]:
Here's a minimal reproducer:

$ cat trtr.scm:
> foo

$ guild compile trtr.scm
> <unknown-location>: warning: possibly unbound variable `foo'
> wrote `$HOME/.cache/guile/ccache/3.0-LE-8-4.6/$HOME/trtr.scm.go'

Curiously, it seems that source locations were actually recorded:

(define-syntax pk-the-source-location
  (lambda (s)
    (pk 'invocation (syntax-source s))
    (syntax-case s ()
      ((_ stuff)
       (pk 'use (syntax-source #'stuff))
       #'stuff))))

(lambda () (pk-the-source-location foo))

;;; [...]
;;; (invocation ((filename . "$HOME/trtr.scm") (line . 8) (column . 11)))

;;; (use ((filename . "$HOME/trtr.scm") (line . 8) (column . 35)))
;;; <unknown-location>: warning: possibly unbound variable `foo'
;;; compiled [...]

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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