guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: grafts: Remove unused variables and confusing monad use.


From: Ludovic Courtès
Subject: 01/02: grafts: Remove unused variables and confusing monad use.
Date: Sat, 15 Oct 2016 21:47:17 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 783ae212c213d6194ecbbdb13b91d93a6644a1ac
Author: Ludovic Courtès <address@hidden>
Date:   Sat Oct 15 16:38:07 2016 +0200

    grafts: Remove unused variables and confusing monad use.
    
    * guix/grafts.scm (cumulative-grafts)[return/cache]: Use %STATE-MONAD,
    not %STORE-MONAD.
    Remove unused 'origins' variable and unnecessary inner 'cache'
    variable.
---
 guix/grafts.scm |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/grafts.scm b/guix/grafts.scm
index 3e7a81a..80ae27e 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -253,7 +253,7 @@ derivations to the corresponding set of grafts."
           (state-return grafts))))
 
   (define (return/cache cache value)
-    (mbegin %store-monad
+    (mbegin %state-monad
       (set-current-state (vhash-consq drv value cache))
       (return value)))
 
@@ -266,10 +266,8 @@ derivations to the corresponding set of grafts."
          (()                                      ;no dependencies
           (return/cache cache grafts))
          (deps                                    ;one or more dependencies
-          (mlet %state-monad ((grafts (mapm %state-monad dependency-grafts 
deps))
-                              (cache  (current-state)))
-            (let* ((grafts     (delete-duplicates (concatenate grafts) equal?))
-                   (origins    (map graft-origin-file-name grafts)))
+          (mlet %state-monad ((grafts (mapm %state-monad dependency-grafts 
deps)))
+            (let ((grafts (delete-duplicates (concatenate grafts) equal?)))
               (match (filter (lambda (graft)
                                (member (graft-origin-file-name graft) deps))
                              grafts)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]