mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
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.
This commit is contained in:
parent
5f01e1bbc6
commit
783ae212c2
1 changed files with 3 additions and 5 deletions
|
@ -253,7 +253,7 @@ (define (dependency-grafts item)
|
|||
(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 @@ (define (return/cache cache value)
|
|||
(() ;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)
|
||||
|
|
Loading…
Reference in a new issue