summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-03-07 22:44:34 +0100
committerLudovic Courtès <ludo@gnu.org>2022-03-07 22:49:29 +0100
commit483e4a9d07cb6e0a3be9ce052618c993a9d2d11e (patch)
tree96f5edb22faf01dff23b9cda13c92ebac3e84227 /guix/import
parent5278cab3dc001b371e1ed2f920b7f0c5678938e3 (diff)
import: hackage: Avoid pointless use of 'compose'.
* guix/import/hackage.scm (hackage-module->sexp): Unroll pointless calls to 'compose'. (hackage->guix-package): Likewise.
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/hackage.scm30
1 files changed, 12 insertions, 18 deletions
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 75def99574..5403768a9d 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -249,23 +249,18 @@ the hash of the Cabal file."
(hackage-source-url name version))
(define hackage-dependencies
- ((compose (cut filter-dependencies <>
- (cabal-package-name cabal))
- (cut cabal-dependencies->names <>))
- cabal))
+ (filter-dependencies (cabal-dependencies->names cabal)
+ (cabal-package-name cabal)))
(define hackage-native-dependencies
(lset-difference
equal?
- ((compose (cut filter-dependencies <>
- (cabal-package-name cabal))
- ;; FIXME: Check include-test-dependencies?
- (lambda (cabal)
- (append (if include-test-dependencies?
- (cabal-test-dependencies->names cabal)
- '())
- (cabal-custom-setup-dependencies->names cabal))))
- cabal)
+ (filter-dependencies
+ (append (if include-test-dependencies?
+ (cabal-test-dependencies->names cabal)
+ '())
+ (cabal-custom-setup-dependencies->names cabal))
+ (cabal-package-name cabal))
hackage-dependencies))
(define dependencies
@@ -339,11 +334,10 @@ respectively."
(read-cabal-and-hash port)
(hackage-fetch-and-hash package-name))))
(if cabal-meta
- ((compose (cut hackage-module->sexp <> cabal-hash
- #:include-test-dependencies?
- include-test-dependencies?)
- (cut eval-cabal <> cabal-environment))
- cabal-meta)
+ (hackage-module->sexp (eval-cabal cabal-meta cabal-environment)
+ cabal-hash
+ #:include-test-dependencies?
+ include-test-dependencies?)
(values #f '()))))
(define hackage->guix-package/m ;memoized variant