guix-commits
[Top][All Lists]
Advanced

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

03/06: DRAFT gexp: 'lower-inputs' uses 'mapm/accumulate-builds'.


From: guix-commits
Subject: 03/06: DRAFT gexp: 'lower-inputs' uses 'mapm/accumulate-builds'.
Date: Wed, 25 Mar 2020 11:22:58 -0400 (EDT)

civodul pushed a commit to branch wip-build-accumulator
in repository guix.

commit 56ab07e71b3ec45637174468078ee1ff4adc116f
Author: Ludovic Courtès <address@hidden>
AuthorDate: Wed Mar 25 12:43:49 2020 +0100

    DRAFT gexp: 'lower-inputs' uses 'mapm/accumulate-builds'.
    
    DRAFT: Check performance impact.
    
    * guix/gexp.scm (lower-inputs): Use 'mapm/accumulate-builds' instead of 
'mapm'.
---
 guix/gexp.scm | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/guix/gexp.scm b/guix/gexp.scm
index 133e0f5..3d21685 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -683,22 +683,22 @@ When TARGET is true, use it as the cross-compilation 
target triplet."
     (and (string? obj) (store-path? obj)))
 
   (with-monad %store-monad
-    (mapm %store-monad
-          (match-lambda
-            (((? struct? thing) sub-drv ...)
-             (mlet %store-monad ((obj (lower-object
-                                       thing system #:target target)))
-               (return (match obj
-                         ((? derivation? drv)
-                          (let ((outputs (if (null? sub-drv)
-                                             '("out")
-                                             sub-drv)))
-                            (derivation-input drv outputs)))
-                         ((? store-item? item)
-                          item)))))
-            (((? store-item? item))
-             (return item)))
-          inputs)))
+    (mapm/accumulate-builds
+     (match-lambda
+       (((? struct? thing) sub-drv ...)
+        (mlet %store-monad ((obj (lower-object
+                                  thing system #:target target)))
+          (return (match obj
+                    ((? derivation? drv)
+                     (let ((outputs (if (null? sub-drv)
+                                        '("out")
+                                        sub-drv)))
+                       (derivation-input drv outputs)))
+                    ((? store-item? item)
+                     item)))))
+       (((? store-item? item))
+        (return item)))
+     inputs)))
 
 (define* (lower-reference-graphs graphs #:key system target)
   "Given GRAPHS, a list of (FILE-NAME INPUT ...) lists for use as a



reply via email to

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