GNU bug report logs - #10922
procedure-argumets does not work with advanced evaled lambdas

Previous Next

Package: guile;

Reported by: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>

Date: Thu, 1 Mar 2012 22:00:02 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 10922 in the body.
You can then email your comments to 10922 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#10922; Package guile. (Thu, 01 Mar 2012 22:00: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. (Thu, 01 Mar 2012 22:00:02 GMT) Full text and rfc822 format available.

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

From: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: procedure-argumets does not work with advanced evaled lambdas
Date: Thu, 1 Mar 2012 22:58:53 +0100
[Message part 1 (text/plain, inline)]
Here is a transcript of the problem

scheme@(guile-user)> (define f (lambda* (#:key x) x))
scheme@(guile-user)> (procedure-arguments f)

$53 = ((required) (optional) (keyword (#:x . 0)) (allow-other-keys? . #f)
(rest . #f))

scheme@(guile-user)> (define f (eval '(lambda* (#:key x) x)
(current-module)))
scheme@(guile-user)> (procedure-arguments f)

$54 = ((required) (optional) (keyword) (allow-other-keys? . #f) (rest .
%args))

Why is this important.

As an example trying to port rackets contract you have functions that take
a function
and return a new function with checks according to a contract added. the
functionality
is the same but input and output is checked. Now to use this, information
about the
keywords are needed in order to do some sanity checks that can be done at
construction
time. But if we eval a lambda and use that, we saw above that the
information is not added.
and the nice idea with contracts is broken.


Solution idea:

mod eval.scm and as described in session.scm make sure to add a 'arglist
procedure-property
to the newly constructed lambda with the appropriate information added.

Regards
Stefan
[Message part 2 (text/html, inline)]

Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Fri, 06 Jul 2012 12:17:06 GMT) Full text and rfc822 format available.

Notification sent to Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>:
bug acknowledged by developer. (Fri, 06 Jul 2012 12:17:06 GMT) Full text and rfc822 format available.

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

From: Andy Wingo <wingo <at> pobox.com>
To: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
Cc: 10922-done <at> debbugs.gnu.org
Subject: Re: bug#10922: procedure-argumets does not work with advanced evaled
	lambdas
Date: Fri, 06 Jul 2012 12:19:51 +0200
Fixed in fc835b1b, thanks for the report.

Andy
-- 
http://wingolog.org/




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

This bug report was last modified 11 years and 272 days ago.

Previous Next


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