From: Andy Wingo <wingo@pobox.com>
To: Nala Ginrut <nalaginrut@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: [PATCH] Move let/ec to top-level
Date: Tue, 22 Jan 2013 12:43:51 +0100 [thread overview]
Message-ID: <87vcapv3wo.fsf@pobox.com> (raw)
In-Reply-To: <CAPjoZocuyJRhiawNcqwLxJDeiyk1cvmsiV4VeaBY68jPrVgTfA@mail.gmail.com> (Nala Ginrut's message of "Mon, 14 Jan 2013 23:20:49 +0800")
Hi Nala,
This form is missing documentation and a test case. I would also add it
to (ice-9 control) instead of to the core, along with the corresponding
call/ec and perhaps the longer names as well.
On Mon 14 Jan 2013 16:20, Nala Ginrut <nalaginrut@gmail.com> writes:
> +(define-syntax-rule (let/ec k e e* ...)
> + (let ((tag (make-prompt-tag)))
> + (call-with-prompt
> + tag
> + (lambda ()
> + (let ((k (lambda args (apply abort-to-prompt tag args))))
> + e e* ...))
> + (lambda (_ res) res))))
> +
Here the handler should be:
(lambda (_ . results) (apply values results))
I would also look for let/ec in the rest of Guile and change them to
use the core definition (in peval for example I know there is one).
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2013-01-22 11:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 15:20 [PATCH] Move let/ec to top-level Nala Ginrut
2013-01-22 11:43 ` Andy Wingo [this message]
2013-03-27 21:14 ` Ludovic Courtès
2013-04-04 6:19 ` Nala Ginrut
2013-04-05 20:59 ` Ludovic Courtès
2013-04-06 0:52 ` Ian Price
2013-04-06 2:53 ` Nala Ginrut
2013-04-06 1:04 ` Ian Price
2013-04-06 13:38 ` Ludovic Courtès
2013-04-06 2:15 ` Ian Price
2013-04-06 13:41 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vcapv3wo.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=nalaginrut@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).