diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-10-15 16:38:07 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-10-15 23:46:39 +0200 |
commit | 783ae212c213d6194ecbbdb13b91d93a6644a1ac (patch) | |
tree | 4536cf59339586196405af2de03c7989534bd454 /guix/grafts.scm | |
parent | 5f01e1bbc67fc21e9314d39f0a37064cced8bb85 (diff) | |
download | gnu-guix-783ae212c213d6194ecbbdb13b91d93a6644a1ac.tar gnu-guix-783ae212c213d6194ecbbdb13b91d93a6644a1ac.tar.gz |
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.
Diffstat (limited to 'guix/grafts.scm')
-rw-r--r-- | guix/grafts.scm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/guix/grafts.scm b/guix/grafts.scm index 3e7a81a4c7..80ae27e9b0 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) |