mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Remove duplicate definitions of call/ec' and
let/ec'.
* module/language/tree-il/peval.scm (let/ec): Remove. Import (ice-9 control). * module/sxml/match.scm (%call/ec-prompt, call/ec, let/ec): Remove. Import (ice-9 control). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
47ed3ca43a
commit
4ad329cbca
2 changed files with 3 additions and 26 deletions
|
@ -26,6 +26,7 @@
|
|||
#:use-module (srfi srfi-9)
|
||||
#:use-module (srfi srfi-11)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (ice-9 control)
|
||||
#:export (peval))
|
||||
|
||||
;;;
|
||||
|
@ -73,15 +74,6 @@
|
|||
(newline)
|
||||
(values)))
|
||||
|
||||
(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))))
|
||||
|
||||
(define (tree-il-any proc exp)
|
||||
(let/ec k
|
||||
(tree-il-fold (lambda (exp res)
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
sxml-match-let
|
||||
sxml-match-let*)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-11))
|
||||
#:use-module (srfi srfi-11)
|
||||
#:use-module (ice-9 control))
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
@ -46,22 +47,6 @@
|
|||
(define-syntax-rule (void)
|
||||
*unspecified*)
|
||||
|
||||
(define %call/ec-prompt
|
||||
(make-prompt-tag))
|
||||
|
||||
(define-syntax-rule (call/ec proc)
|
||||
;; aka. `call-with-escape-continuation'
|
||||
(call-with-prompt %call/ec-prompt
|
||||
(lambda ()
|
||||
(proc (lambda args
|
||||
(apply abort-to-prompt
|
||||
%call/ec-prompt args))))
|
||||
(lambda (_ . args)
|
||||
(apply values args))))
|
||||
|
||||
(define-syntax-rule (let/ec cont body ...)
|
||||
(call/ec (lambda (cont) body ...)))
|
||||
|
||||
(define (raise-syntax-error x msg obj sub)
|
||||
(throw 'sxml-match-error x msg obj sub))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue