diff mbox series

[bug#62047,1/2] packages: Use SRFI-71 instead of SRFI-11.

Message ID 20230308120345.17616-1-ludo@gnu.org
State New
Headers show
Series '--with-input' & co. no longer replace hidden packages | expand

Commit Message

Ludovic Courtès March 8, 2023, 12:03 p.m. UTC
* guix/packages.scm (package-input-rewriting/spec): Use SRFI-71 'let'.
---
 guix/packages.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Simon Tournier March 10, 2023, 11:49 a.m. UTC | #1
Hi Ludo,

On mer., 08 mars 2023 at 13:03, Ludovic Courtès <ludo@gnu.org> wrote:

> -               (let-values (((name version)
> -                             (package-name->name+version spec)))
> +               (let ((name version (package-name->name+version spec)))

Out of curiosity, what is the difference?  Aside SRFI-71 instead of
SRFI-11?  Or why do you prefer SRFI-71 over -11?

Cheers,
simon
Ludovic Courtès March 10, 2023, 4:46 p.m. UTC | #2
Simon Tournier <zimon.toutoune@gmail.com> skribis:

> On mer., 08 mars 2023 at 13:03, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> -               (let-values (((name version)
>> -                             (package-name->name+version spec)))
>> +               (let ((name version (package-name->name+version spec)))
>
> Out of curiosity, what is the difference?  Aside SRFI-71 instead of
> SRFI-11?  Or why do you prefer SRFI-71 over -11?

There’s no semantic difference, but SRFI-71 looks clearer, doesn’t it?
:-)

See
<https://lists.gnu.org/archive/html/guix-devel/2021-01/msg00234.html>
for the original proposal.

Ludo’.
Simon Tournier March 10, 2023, 5:44 p.m. UTC | #3
Hi,

On Fri, 10 Mar 2023 at 17:46, Ludovic Courtès <ludo@gnu.org> wrote:

> See
> <https://lists.gnu.org/archive/html/guix-devel/2021-01/msg00234.html>
> for the original proposal.

Thanks!  I had overlooked this.

Cheers,
simon
diff mbox series

Patch

diff --git a/guix/packages.scm b/guix/packages.scm
index 041a872f9d..cd61878bcc 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1,5 +1,5 @@ 
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
@@ -51,10 +51,10 @@  (define-module (guix packages)
   #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9 gnu)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
+  #:use-module (srfi srfi-71)
   #:use-module (rnrs bytevectors)
   #:use-module (web uri)
   #:autoload   (texinfo) (texi-fragment->stexi)
@@ -1534,8 +1534,7 @@  (define table
     (fold (lambda (replacement table)
             (match replacement
               ((spec . proc)
-               (let-values (((name version)
-                             (package-name->name+version spec)))
+               (let ((name version (package-name->name+version spec)))
                  (vhash-cons name (list version proc) table)))))
           vlist-null
           replacements))