GNU bug report logs - #40647
[PATCH] shepherd: remove local call/ec definition.

Previous Next

Package: guix-patches;

Reported by: guy fleury iteriteka <gfleury <at> disroot.org>

Date: Wed, 15 Apr 2020 18:16:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40647 in the body.
You can then email your comments to 40647 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#40647; Package guix-patches. (Wed, 15 Apr 2020 18:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to guy fleury iteriteka <gfleury <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 15 Apr 2020 18:16:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: guy fleury iteriteka <gfleury <at> disroot.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] shepherd: remove local call/ec definition.
Date: Wed, 15 Apr 2020 20:09:58 +0200
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(-)

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





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 16 Apr 2020 16:19:02 GMT) Full text and rfc822 format available.

Notification sent to guy fleury iteriteka <gfleury <at> disroot.org>:
bug acknowledged by developer. (Thu, 16 Apr 2020 16:19:02 GMT) Full text and rfc822 format available.

Message #10 received at 40647-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: guy fleury iteriteka <gfleury <at> disroot.org>
Cc: 40647-done <at> debbugs.gnu.org
Subject: Re: [bug#40647] [PATCH] shepherd: remove local call/ec definition.
Date: Thu, 16 Apr 2020 18:18:16 +0200
Hi,

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

> 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.

> * 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’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 15 May 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.