GNU bug report logs -
#13509
wrong "definition in expression context" in R6RS mode
Previous Next
Reported by: marco.maggi-ipsu <at> poste.it
Date: Sun, 20 Jan 2013 20:07:02 UTC
Severity: normal
Done: Mark H Weaver <mhw <at> netris.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#13509: wrong "definition in expression context" in R6RS mode
which was filed against the guile package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 13509 <at> debbugs.gnu.org.
--
13509: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13509
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Marco Maggi <marco.maggi-ipsu <at> poste.it> writes:
> #!r6rs
> (import (rnrs))
> (define (alpha)
> (define-syntax define-special
> (syntax-rules ()
> ((_ ?who ?val)
> (define ?who ?val))))
> (define-special beta #t)
> #f)
> (alpha)
>
> should succeed, but instead it fails with:
>
[...]
> ;;; /home/marco/var/tmp/proof.sps:12:2: definition in
> ;;; expression context, where definitions a re not allowed, in form (define beta #t)
Fixed in ceb7f9cc126f50e0cc8956b80ac5d111580b23c8
(which is now in stable-2.0 but not yet in master)
Thanks for the report!
Mark
[Message part 3 (message/rfc822, inline)]
On my i686-pc-linux-gnu running:
$ guile --version
guile (GNU Guile) 2.1.0.1329-d7cb7
built from the head of the "master" branch, this program:
#!r6rs
(import (rnrs))
(define (alpha)
(define-syntax define-special
(syntax-rules ()
((_ ?who ?val)
(define ?who ?val))))
(define-special beta #t)
#f)
(alpha)
should succeed, but instead it fails with:
;;; compiling /home/marco/var/tmp/proof.sps
;;; WARNING: compilation of /home/marco/var/tmp/proof.sps failed:
;;; ERROR: Syntax error:
;;; /home/marco/var/tmp/proof.sps:12:2: definition in
;;; expression context, where definitions a re not allowed, in form (define beta #t)
ice-9/boot-9.scm:718:27: In procedure map:
ice-9/boot-9.scm:718:27: Syntax error:
/home/marco/var/tmp/proof.sps:12:2: definition in expression context, where definitions are not allowed, in form (define beta #t)
--
Marco Maggi
This bug report was last modified 12 years and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.