unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#10922: procedure-argumets does not work with advanced evaled lambdas
@ 2012-03-01 21:58 Stefan Israelsson Tampe
  2012-07-06 10:19 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Israelsson Tampe @ 2012-03-01 21:58 UTC (permalink / raw)
  To: 10922

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1250 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#10922: procedure-argumets does not work with advanced evaled lambdas
  2012-03-01 21:58 bug#10922: procedure-argumets does not work with advanced evaled lambdas Stefan Israelsson Tampe
@ 2012-07-06 10:19 ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2012-07-06 10:19 UTC (permalink / raw)
  To: Stefan Israelsson Tampe; +Cc: 10922-done

Fixed in fc835b1b, thanks for the report.

Andy
-- 
http://wingolog.org/





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-06 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-01 21:58 bug#10922: procedure-argumets does not work with advanced evaled lambdas Stefan Israelsson Tampe
2012-07-06 10:19 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).