[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/13: import: hackage: Avoid pointless use of 'compose'.
From: |
guix-commits |
Subject: |
12/13: import: hackage: Avoid pointless use of 'compose'. |
Date: |
Mon, 7 Mar 2022 16:50:55 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 483e4a9d07cb6e0a3be9ce052618c993a9d2d11e
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Mar 7 22:44:34 2022 +0100
import: hackage: Avoid pointless use of 'compose'.
* guix/import/hackage.scm (hackage-module->sexp): Unroll pointless calls
to 'compose'.
(hackage->guix-package): Likewise.
---
guix/import/hackage.scm | 30 ++++++++++++------------------
1 file 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
- branch master updated (34ba6e0616 -> f7bb161445), guix-commits, 2022/03/07
- 01/13: tests: Adjust to (guix import github) changes., guix-commits, 2022/03/07
- 02/13: gnu: scotch: Explicitly pass "-DINTSIZE" to CMake., guix-commits, 2022/03/07
- 03/13: derivations: Coalesce inputs that have the same output path., guix-commits, 2022/03/07
- 04/13: gnu: Add gnusim8085., guix-commits, 2022/03/07
- 10/13: import: cran: Return multiple values for unknown packages., guix-commits, 2022/03/07
- 12/13: import: hackage: Avoid pointless use of 'compose'.,
guix-commits <=
- 13/13: import: hackage: Use SRFI-71 instead of SRFI-11., guix-commits, 2022/03/07
- 05/13: gnu: Add python-multipart., guix-commits, 2022/03/07
- 07/13: import: pypi: Return multiple values for unknown packages., guix-commits, 2022/03/07
- 08/13: import: hackage: Return multiple values for unknown packages., guix-commits, 2022/03/07
- 11/13: scripts: import: gem: Fix recursive error handling., guix-commits, 2022/03/07
- 06/13: import: pypi: Gracefully handle missing project home page., guix-commits, 2022/03/07
- 09/13: import: elpa: Return multiple values for unknown packages., guix-commits, 2022/03/07