From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: shift and reset in ice-9 control Date: Thu, 17 Mar 2011 11:53:31 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1300362772 28746 80.91.229.12 (17 Mar 2011 11:52:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2011 11:52:52 +0000 (UTC) Cc: bug-guile@gnu.org To: Wolfgang J Moeller Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Mar 17 12:52:48 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0Bkw-0005yb-N6 for guile-bugs@m.gmane.org; Thu, 17 Mar 2011 12:52:42 +0100 Original-Received: from localhost ([127.0.0.1]:41614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0Bkw-0006z5-9W for guile-bugs@m.gmane.org; Thu, 17 Mar 2011 07:52:42 -0400 Original-Received: from [140.186.70.92] (port=53447 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0Bkm-0006xl-R4 for bug-guile@gnu.org; Thu, 17 Mar 2011 07:52:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0Bkl-0007IK-16 for bug-guile@gnu.org; Thu, 17 Mar 2011 07:52:32 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:65241 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0Bkk-0006my-VI for bug-guile@gnu.org; Thu, 17 Mar 2011 07:52:30 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id B5D943ABB; Thu, 17 Mar 2011 07:52:01 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=fW3qeJumNYpTEEtQqoxOd+RZWKg=; b=t7ypBK 4ewLcRBl5LpxdSqNyoUwqU7jEgXkdTimTvQDx9YXJ78ex8Zucbx88JiWnafmt0Qq f5ftpsf3vbKst8LyamgvJWCx7bUWCcOWLcEi+NjO+UrWZouY5YXo29YYXoPbbvlJ 8MzSqVfMnnsG+YRyKiuYtr0HTKZnkD4yYlBwk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=bF7Es3Rshv40tSK0or8X0FDf99szIsUo S9pcUqIeKuTsprMi0vuj9hltYu3vIhda2lb7HW1UVqRdX5mngBDZFUTupyuzLCAq ayRZoFNuMIbGhThzME91zbdODqvGVsJGo74ESo6plB7+jSidRVlXy5y2UeoipK9J wdoYisXgaJg= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 9ABE63AB8; Thu, 17 Mar 2011 07:52:00 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id C55D73AB2; Thu, 17 Mar 2011 07:51:58 -0400 (EDT) In-Reply-To: (Wolfgang J. Moeller's message of "Wed, 9 Mar 2011 11:53:38 +0100 (CET)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: F7D2FEAE-508C-11E0-B953-E8AB60295C12-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5331 Archived-At: Hello again Wolfgang, On Wed 09 Mar 2011 11:53, Wolfgang J Moeller writes: > ;;; -*- scheme -*- > ;; > ;;; try reset & shift with GUILE V2 prompts > ;; > ;; > (define-syntax reset > (syntax-rules () > ((_ . body) > (call-with-prompt 'Reset > (lambda () . body) > (lambda (cont f) (f cont)))))) > ;; > (define-syntax shift > (syntax-rules () > ((_ var . body) > (abort-to-prompt 'Reset > (lambda (cont) > ((lambda (var) (reset . body)) > (lambda vals (reset (apply cont vals))))))))) > ;; > ;; > (define (reset* thunk) > (reset (thunk))) > ;; > (define (shift* fc) > (shift c (fc c))) Did you write these yourself? May we include them in (ice-9 control)? If you have additional useful tests, we are happy to include them as well. Probably the easiest thing would be to mail them to the list with a permissive copyright header. Cheers, Andy -- http://wingolog.org/