GNU bug report logs -
#39854
Not correct line and column numbers associated to function.
Previous Next
To reply to this bug, email your comments to 39854 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#39854
; Package
guile
.
(Sun, 01 Mar 2020 12:18:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Sun, 01 Mar 2020 12:18:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Consider this source file: test.scm:
(use-modules (language python def) (system syntax internal) ((oop dict)
#:select (slask-it)))
(define-syntax m
(lambda (x)
(syntax-case x ()
((_ n m y)
(let* ((xx (syntax-expression x))
(yy (pk 'yy (source-properties xx)))
(zz (syntax-expression #'y))
(ww (pk 'ww (source-properties zz)))
(nn (assoc 'line yy))
(mm (assoc 'column yy))
(ii (assoc 'line ww))
(jj (assoc 'column ww)))
(if nn (set-cdr! nn (syntax->datum #'n)))
(if mm (set-cdr! mm (syntax->datum #'m)))
(if ii (set-cdr! ii (syntax->datum #'n)))
(if jj (set-cdr! jj (syntax->datum #'m)))
(set-source-properties! xx (pk yy))
(set-source-properties! zz (pk ww))
#'y)))))
(define f (slask-it (lambda () 1)))
;;-----------------------------------------------------
Never mind the m macro and concentrate on the last define of f. slask-it is
an imported function
and equivalent to (lambda (x) x) (just to make sure to annynmous f. loading
this source file an d quiring f lead to
cheme@(guile-user)> f
$10 = #<procedure 7fa3c1db93b0 at test.scm:4:2 ()>
Why 4:2? the line number is much higher and column number as well.
Regards
Stefan
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#39854
; Package
guile
.
(Thu, 05 Mar 2020 21:55:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 39854 <at> debbugs.gnu.org (full text, mbox):
Hi,
Stefan Israelsson Tampe <stefan.itampe <at> gmail.com> skribis:
> Consider this source file: test.scm:
>
> (use-modules (language python def) (system syntax internal) ((oop dict)
> #:select (slask-it)))
>
> (define-syntax m
> (lambda (x)
> (syntax-case x ()
> ((_ n m y)
> (let* ((xx (syntax-expression x))
> (yy (pk 'yy (source-properties xx)))
> (zz (syntax-expression #'y))
> (ww (pk 'ww (source-properties zz)))
> (nn (assoc 'line yy))
> (mm (assoc 'column yy))
> (ii (assoc 'line ww))
> (jj (assoc 'column ww)))
> (if nn (set-cdr! nn (syntax->datum #'n)))
> (if mm (set-cdr! mm (syntax->datum #'m)))
> (if ii (set-cdr! ii (syntax->datum #'n)))
> (if jj (set-cdr! jj (syntax->datum #'m)))
> (set-source-properties! xx (pk yy))
> (set-source-properties! zz (pk ww))
> #'y)))))
>
> (define f (slask-it (lambda () 1)))
>
> ;;-----------------------------------------------------
>
> Never mind the m macro and concentrate on the last define of f. slask-it is
> an imported function
> and equivalent to (lambda (x) x) (just to make sure to annynmous f. loading
> this source file an d quiring f lead to
>
> cheme@(guile-user)> f
> $10 = #<procedure 7fa3c1db93b0 at test.scm:4:2 ()>
>
> Why 4:2? the line number is much higher and column number as well.
I wonder if it relates to <https://issues.guix.gnu.org/issue/38388> and
<https://lists.gnu.org/archive/html/guile-user/2020-03/msg00006.html>.
Ludo’.
This bug report was last modified 5 years and 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.