[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/13: import: hackage: Use SRFI-71 instead of SRFI-11.
From: |
guix-commits |
Subject: |
13/13: import: hackage: Use SRFI-71 instead of SRFI-11. |
Date: |
Mon, 7 Mar 2022 16:50:55 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit f7bb161445903c51d299307610403cb3de0fcc56
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Mar 7 22:48:10 2022 +0100
import: hackage: Use SRFI-71 instead of SRFI-11.
* guix/import/hackage.scm (read-cabal-and-hash)
(hackage-fetch-and-hash, hackage-fetch)
(hackage->guix-package): Use 'let' and 'let*' instead of 'let-values'
and 'let*-values'.
---
guix/import/hackage.scm | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 5403768a9d..0d6c77e399 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -26,9 +26,9 @@
(define-module (guix import hackage)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
+ #:use-module (srfi srfi-71)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-26)
- #:use-module (srfi srfi-11)
#:use-module (srfi srfi-1)
#:use-module ((guix download) #:select (download-to-store url-fetch))
#:use-module ((guix utils) #:select (package-name->name+version
@@ -137,7 +137,7 @@ version is returned."
(define (read-cabal-and-hash port)
"Read a Cabal file from PORT and return it and its hash in nix-base32
format as two values."
- (let-values (((port get-hash) (open-sha256-input-port port)))
+ (let ((port get-hash (open-sha256-input-port port)))
(values (read-cabal (canonical-newline-port port))
(bytevector->nix-base32-string (get-hash)))))
@@ -149,10 +149,10 @@ version. On failure, both return values will be #f."
(guard (c ((and (http-get-error? c)
(= 404 (http-get-error-code c)))
(values #f #f))) ;"expected" if package is unknown
- (let*-values (((name version) (package-name->name+version name-version))
- ((url) (hackage-cabal-url name version))
- ((port _) (http-fetch url))
- ((cabal hash) (read-cabal-and-hash port)))
+ (let* ((name version (package-name->name+version name-version))
+ (url (hackage-cabal-url name version))
+ (port _ (http-fetch url))
+ (cabal hash (read-cabal-and-hash port)))
(close-port port)
(values cabal hash))))
@@ -160,7 +160,7 @@ version. On failure, both return values will be #f."
"Return the Cabal file for the package NAME-VERSION, or #f on failure. If
the version part is omitted from the package name, then return the latest
version."
- (let-values (((cabal hash) (hackage-fetch-and-hash name-version)))
+ (let ((cabal hash (hackage-fetch-and-hash name-version)))
cabal))
(define string->license
@@ -329,10 +329,10 @@ symbol 'true' or 'false'. The value associated with
other keys has to conform
to the Cabal file format definition. The default value associated with the
keys \"os\", \"arch\" and \"impl\" is \"linux\", \"x86_64\" and \"ghc\"
respectively."
- (let-values (((cabal-meta cabal-hash)
- (if port
- (read-cabal-and-hash port)
- (hackage-fetch-and-hash package-name))))
+ (let ((cabal-meta cabal-hash
+ (if port
+ (read-cabal-and-hash port)
+ (hackage-fetch-and-hash package-name))))
(if cabal-meta
(hackage-module->sexp (eval-cabal cabal-meta cabal-environment)
cabal-hash
- 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, 2022/03/07
- 13/13: import: hackage: Use SRFI-71 instead of SRFI-11.,
guix-commits <=
- 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