GNU bug report logs - #18583
possibly buggy top level behavior in master

Previous Next

Package: guile;

Reported by: Daniel Llorens <daniel.llorens <at> bluewin.ch>

Date: Mon, 29 Sep 2014 13:26:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18583 in the body.
You can then email your comments to 18583 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#18583; Package guile. (Mon, 29 Sep 2014 13:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Llorens <daniel.llorens <at> bluewin.ch>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Mon, 29 Sep 2014 13:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Llorens <daniel.llorens <at> bluewin.ch>
To: bug-guile <at> gnu.org
Subject: possibly buggy top level behavior in master
Date: Mon, 29 Sep 2014 15:24:31 +0200
The following code:

(define-syntax define-lues
  (syntax-rules ()
    ((_ () exp)
     (call-with-values (lambda () exp) (lambda () 'unspecified)))
    ((_ (var . vars) exp)
     (begin
       (define var (call-with-values (lambda () exp) list))
       (define-lues vars (apply values (cdr var)))
       (define var (car var))))
    ((_ var exp)
     (define var (call-with-values (lambda () exp) list)))))

(define-lues (a) (values (make-vector 3 9)))
(vector-length a)

In 2.0, either pasting this in the REPL or (load "...") a file
containing this produces the expected result, 3.

In the current master (f7582), pasting in the REPL produces the
same result, but loading from a file this produces the error:

> In procedure vector-ref: Wrong type argument in position 1 (expecting vector): (#(9 9 9))

I'm aware of the workarounds, I'm reporting the behavior itself.

Regards,

	Daniel





Information forwarded to bug-guile <at> gnu.org:
bug#18583; Package guile. (Tue, 21 Jun 2016 20:51:02 GMT) Full text and rfc822 format available.

Message #8 received at 18583 <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: Daniel Llorens <daniel.llorens <at> bluewin.ch>
Cc: 18583 <at> debbugs.gnu.org
Subject: Re: bug#18583: possibly buggy top level behavior in master
Date: Tue, 21 Jun 2016 22:50:02 +0200
On Mon 29 Sep 2014 15:24, Daniel Llorens <daniel.llorens <at> bluewin.ch> writes:

> The following code:
>
> (define-syntax define-lues
>   (syntax-rules ()
>     ((_ () exp)
>      (call-with-values (lambda () exp) (lambda () 'unspecified)))
>     ((_ (var . vars) exp)
>      (begin
>        (define var (call-with-values (lambda () exp) list))
>        (define-lues vars (apply values (cdr var)))
>        (define var (car var))))
>     ((_ var exp)
>      (define var (call-with-values (lambda () exp) list)))))
>
> (define-lues (a) (values (make-vector 3 9)))
> (vector-length a)
>
> In 2.0, either pasting this in the REPL or (load "...") a file
> containing this produces the expected result, 3.
>
> In the current master (f7582), pasting in the REPL produces the
> same result, but loading from a file this produces the error:
>
>> In procedure vector-ref: Wrong type argument in position 1 (expecting vector): (#(9 9 9))
>
> I'm aware of the workarounds, I'm reporting the behavior itself.

Thank you thank you thank you for this report!

Incidentally it has a nice reduction, at the REPL or whereever:

  (begin
    (define x (list 1))
    (define x (car x))
    x)

Should be 1, Guile master was giving (1).  The reasons are a bug in the
effects analysis for the `define!' primitive.  I wonder how I didn't
catch this before!  Fixed in master, though sadly with a bytecode
version bump.

Andy




Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Tue, 21 Jun 2016 20:52:01 GMT) Full text and rfc822 format available.

Notification sent to Daniel Llorens <daniel.llorens <at> bluewin.ch>:
bug acknowledged by developer. (Tue, 21 Jun 2016 20:52:01 GMT) Full text and rfc822 format available.

Message #13 received at 18583-done <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: 18583-done <at> debbugs.gnu.org
Subject: Re: bug#18583: possibly buggy top level behavior in master
Date: Tue, 21 Jun 2016 22:51:17 +0200
thanks




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 20 Jul 2016 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.