[PATCH] shepherd: remove local call/ec definition.

  • Done
  • quality assurance status badge
Details
2 participants
  • guy fleury iteriteka
  • Ludovic Courtès
Owner
unassigned
Submitted by
guy fleury iteriteka
Severity
normal

Debbugs page

guy fleury iteriteka wrote 5 years ago
(address . guix-patches@gnu.org)
20200415180958.1983-1-gfleury@disroot.org
Tests pass with guile 2.2 and 3.0.
I haven't test it with guile 2.0 version.

* modules/shepherd/args.scm(module): import (ice-9 control) module.
* modules/shepherd/service.scm: Likewise.
* modules/shepherd/support.scm(call/ec): remove call/ec definition and
his exportation.
---
modules/shepherd/args.scm | 1 +
modules/shepherd/service.scm | 1 +
modules/shepherd/support.scm | 13 -------------
3 files changed, 2 insertions(+), 13 deletions(-)

Toggle diff (57 lines)
diff --git a/modules/shepherd/args.scm b/modules/shepherd/args.scm
index 604768f..b98f29c 100644
--- a/modules/shepherd/args.scm
+++ b/modules/shepherd/args.scm
@@ -20,6 +20,7 @@
(define-module (shepherd args)
#:use-module (oop goops)
#:use-module (srfi srfi-1)
+ #:use-module ((ice-9 control) #:select (call/ec))
#:use-module (shepherd support)
#:use-module (shepherd config)
#:export (<option>
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index fc82cc4..88b5c07 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -29,6 +29,7 @@
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
#:use-module (rnrs io ports)
+ #:use-module ((ice-9 control) #:select (call/ec))
#:use-module (ice-9 match)
#:use-module (ice-9 format)
#:autoload (ice-9 pretty-print) (truncated-print)
diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm
index 1f73f6b..cdb7b35 100644
--- a/modules/shepherd/support.scm
+++ b/modules/shepherd/support.scm
@@ -25,7 +25,6 @@
#:use-module (ice-9 match)
#:export (buffering-mode
- call/ec
caught-error
assert
label
@@ -80,18 +79,6 @@
((_ none)
(if-2.0 _IONBF 'none))))
-;; Implement `call-with-escape-continuation' with `catch' and `throw'.
-;; FIXME: Multiple return values.
-(define (call/ec proc)
- (let* ((catch-sym (gensym))
- (escape (lambda (value)
- (throw catch-sym value))))
- (catch catch-sym
- (lambda ()
- (proc escape))
- (lambda (sym value)
- value))))
-
;; Report the caught error.
;; FIXME: Needs some more work.
(define (caught-error key args)
--
2.25.1
Ludovic Courtès wrote 5 years ago
(name . guy fleury iteriteka)(address . gfleury@disroot.org)(address . 40647-done@debbugs.gnu.org)
87k12fh0af.fsf@gnu.org
Hi,

guy fleury iteriteka <gfleury@disroot.org> skribis:

Toggle quote (3 lines)
> Tests pass with guile 2.2 and 3.0.
> I haven't test it with guile 2.0 version.

2.0 has ‘call/ec’ as well, so it should be fine.

Toggle quote (5 lines)
> * modules/shepherd/args.scm(module): import (ice-9 control) module.
> * modules/shepherd/service.scm: Likewise.
> * modules/shepherd/support.scm(call/ec): remove call/ec definition and
> his exportation.

I adjusted the commit log and pushed, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 40647@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40647
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help