Use 'mapm' instead of 'sequence' + 'map'.

Previously we'd use the (sequence M (map P L)) idiom just because 'mapm'
was slower (not specialized for the given monad).  This is no longer the
case since commit dcb95c1fc9.

* guix/gexp.scm (lower-inputs): Use (mapm M P L) instead of (sequence
M (map P L)).
(lower-references, gexp->sexp, imported-files): Likewise.
* guix/profiles.scm (profile-derivation): Likewise.
* guix/scripts/environment.scm (inputs->requisites): Likewise.
* guix/scripts/system.scm (copy-closure): Likewise.
This commit is contained in:
Ludovic Courtès 2017-06-25 15:33:58 +02:00
parent 73b0ebdd5e
commit b334674fe5
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
3 changed files with 28 additions and 29 deletions

View file

@ -1383,10 +1383,10 @@ are cross-built for TARGET."
#:target target)))
(extras (if (null? (manifest-entries manifest))
(return '())
(sequence %store-monad
(map (lambda (hook)
(hook manifest))
hooks)))))
(mapm %store-monad
(lambda (hook)
(hook manifest))
hooks))))
(define inputs
(append (filter-map (lambda (drv)
(and (derivation? drv)