GNU bug report logs -
#14537
defect in guile with syntax transformation
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14537 in the body.
You can then email your comments to 14537 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#14537
; Package
guile
.
(Sun, 02 Jun 2013 18:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Dr. M. Luedde" <mirko_luedde <at> yahoo.de>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Sun, 02 Jun 2013 18:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
;; I think the below code exhibits a defect with guile 1.8.7.
;;
;; The `defrec' syntax transformer (defined below) does not behave
;; correctly within an imbedding `let' expression.
;;
;; The system is CYGWIN_NT-6.1-WOW64 WDFN00305859A 1.7.18(0.263/5/3)
;; 2013-04-19 10:39 i686 Cygwin
;;
;; Guile runs in GNU bash, version 4.1.10(4)-release (i686-pc-cygwin)
;; enable `define-syntax' functionality
(use-modules (ice-9 syncase))
;; OK
(let ( (n 99) )
(begin
(define
ev.OK? (lambda (x) (if (zero? x) #t
(od.OK? (- x 1)))))
(define
od.OK? (lambda (x) (if (zero? x) #f
(ev.OK? (- x 1))))))
(od.OK? 99))
;; OK, evaluates to #t
(define-syntax defrec
;; TYPE: syntax transformer.
;;
;; REQUIRES: (defrec . X) requires that X := ((S_1 V_1) ... (S_N
;; V_N)). The S_I are mutually distinct symbols. The V_J may contain
;; references to the S_I. On evaluation of any V_J the value bound
;; to a referenced S_I must not be needed.
;;
;; RETURNS: The value of the expression (begin (define S_1 #f)
;; ... (define S_N #f) (set! S_1 V_1) ... (set! S_N V_N)).
(syntax-rules ()
((_ (S V) ...)
(begin (define S #f) ...
(set! S V) ...))))
;; OK
(defrec
(ev.broken? (lambda (x) (if (zero? x) #t
(od.broken? (- x 1)))))
(od.broken? (lambda (x) (if (zero? x) #f
(ev.broken? (- x 1))))))
(od.broken? 99)
;; OK, evaluates to #t
(let ( (n 99) )
(defrec
(ev.broken? (lambda (x) (if (zero? x) #t
(od.broken? (- x 1)))))
(od.broken? (lambda (x) (if (zero? x) #f
(ev.broken? (- x 1))))))
(od.broken? n))
;; Produces an error message:
;; In standard input:
;; 14: 0* (let* ((n 99)) (defrec (ev.broken? #) (od.broken? #)) (od.broken? n))
;; standard input:14:1: In procedure memoization in expression (let* (#) (defrec # #) ...):
;; standard input:14:1: In file "standard input", line 14: Mixed definitions and expressions in (defrec (ev.broken? (lambda (x) (if (zero? x) #t (od.broken? (- x 1))))) (od.broken? (lambda (x) (if (zero? x) #f (ev.broken? (- x 1)))))).
;; Backtrace:
;; ABORT: (syntax-error)
--
Dr. M. Luedde, Rheinblick 26A, D-69226 Nussloch, Germany
+49-175-2779708, Skype: MirkoLuedde
Information forwarded
to
bug-guile <at> gnu.org
:
bug#14537
; Package
guile
.
(Sun, 02 Jun 2013 21:51:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 14537 <at> debbugs.gnu.org (full text, mbox):
Hello,
Thanks for your report.
"Dr. M. Luedde" <mirko_luedde <at> yahoo.de> skribis:
> ;; I think the below code exhibits a defect with guile 1.8.7.
Would it be an option for you to try this code in Guile 2.0.x?
Guile 1.8.7 is very old and its support for hygienic macros (among other
things) was leaving a lot to be desired.
Ludo’.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#14537
; Package
guile
.
(Mon, 03 Jun 2013 22:30:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 14537 <at> debbugs.gnu.org (full text, mbox):
Hello Ludo,
alright, I compiled guile 2.0.6 on my cygwin system.
Given the amount and content of the warnings, it came as a surprise to me that the compilation apparently was successul and the resulting guile did process my testcase without the previously exhibited errors.
I consider this defect report closed.
Thanks and best, Mirko
P.S.
This "...I compiled guile 2.0.6 on my cygwin system..." and this "... Guile 1.8.7 is very old" might give the cygwin maintainers a hint.
--
Dr. M. Luedde, Rheinblick 26A, D-69226 Nussloch, Germany
+49-175-2779708, Skype: MirkoLuedde
----- Ursprüngliche Message -----
> Von: Ludovic Courtès <ludo <at> gnu.org>
> An: Dr. M. Luedde <mirko_luedde <at> yahoo.de>
> CC: 14537 <at> debbugs.gnu.org; mirko.luedde <at> sap.com
> Gesendet: 23:48 Sonntag, 2.Juni 2013
> Betreff: Re: bug#14537: defect in guile with syntax transformation
>
> Hello,
>
> Thanks for your report.
>
> "Dr. M. Luedde" <mirko_luedde <at> yahoo.de> skribis:
>
>> ;; I think the below code exhibits a defect with guile 1.8.7.
>
> Would it be an option for you to try this code in Guile 2.0.x?
>
> Guile 1.8.7 is very old and its support for hygienic macros (among other
> things) was leaving a lot to be desired.
>
> Ludo’.
>
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Mon, 03 Jun 2013 22:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Dr. M. Luedde" <mirko_luedde <at> yahoo.de>
:
bug acknowledged by developer.
(Mon, 03 Jun 2013 22:41:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 14537-done <at> debbugs.gnu.org (full text, mbox):
Hello,
"Dr. M. Luedde" <mirko_luedde <at> yahoo.de> skribis:
> alright, I compiled guile 2.0.6 on my cygwin system.
>
> Given the amount and content of the warnings, it came as a surprise to me that the compilation apparently was successul and the resulting guile did process my testcase without the previously exhibited errors.
>
> I consider this defect report closed.
OK, thanks!
I know my answer may have sounded a bit frustrating, but it’s been more
than two years since 2.0 was released. It’s really a huge step forward
compared to Guile 1.8, and we hope people can appreciate it and find it
a good incentive to upgrade.
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 02 Jul 2013 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 351 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.