ui: Do not shadow '_' where it's used as a literal syntax match.
Fixes compilation with Guile 2.1. Reported by Mu Lei. * guix/ui.scm (report-load-error) (warn-about-load-error, read/eval-package-expression): Use 'rest' instead of '_' as the pattern variable name. * gnu/packages.scm (%find-package): Likewise. * guix/scripts/build.scm (transform-package-inputs): Likewise. * guix/scripts/hash.scm (guix-hash): Likewise. * guix/scripts/import/gnu.scm (%options, guix-import-gnu): Likewise. * guix/scripts/import/nix.scm (guix-import-nix): Likewise. * guix/scripts/offload.scm (build-machines): Likewise. * guix/scripts/refresh.scm (%options): Likewise. * guix/scripts/substitute.scm (narinfo-signature->canonical-sexp): Likewise.
This commit is contained in:
		
							parent
							
								
									232ccbefc0
								
							
						
					
					
						commit
						e465d9e190
					
				
					 9 changed files with 16 additions and 16 deletions
				
			
		| 
						 | 
					@ -313,7 +313,7 @@ use NAME@VERSION instead~%")))
 | 
				
			||||||
        new)
 | 
					        new)
 | 
				
			||||||
       (#f
 | 
					       (#f
 | 
				
			||||||
        pkg)))
 | 
					        pkg)))
 | 
				
			||||||
    (_
 | 
					    (x
 | 
				
			||||||
     (if version
 | 
					     (if version
 | 
				
			||||||
         (leave (_ "~A: package not found for version ~a~%") name version)
 | 
					         (leave (_ "~A: package not found for version ~a~%") name version)
 | 
				
			||||||
         (if (not fallback?)
 | 
					         (if (not fallback?)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -195,7 +195,7 @@ of \"guile\"."
 | 
				
			||||||
             ((old new)
 | 
					             ((old new)
 | 
				
			||||||
              (cons (specification->package old)
 | 
					              (cons (specification->package old)
 | 
				
			||||||
                    (specification->package new)))
 | 
					                    (specification->package new)))
 | 
				
			||||||
             (_
 | 
					             (x
 | 
				
			||||||
              (leave (_ "invalid replacement specification: ~s~%") spec))))
 | 
					              (leave (_ "invalid replacement specification: ~s~%") spec))))
 | 
				
			||||||
         replacement-specs))
 | 
					         replacement-specs))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -149,5 +149,5 @@ and 'hexadecimal' can be used as well).\n"))
 | 
				
			||||||
         (lambda args
 | 
					         (lambda args
 | 
				
			||||||
           (leave (_ "~a~%")
 | 
					           (leave (_ "~a~%")
 | 
				
			||||||
                  (strerror (system-error-errno args))))))
 | 
					                  (strerror (system-error-errno args))))))
 | 
				
			||||||
      (_
 | 
					      (x
 | 
				
			||||||
       (leave (_ "wrong number of arguments~%"))))))
 | 
					       (leave (_ "wrong number of arguments~%"))))))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
 | 
					;;; Copyright © 2014, 2016 Ludovic Courtès <ludo@gnu.org>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -68,7 +68,7 @@ Return a package declaration template for PACKAGE, a GNU package.\n"))
 | 
				
			||||||
                     ((or "interactive" "always" "never")
 | 
					                     ((or "interactive" "always" "never")
 | 
				
			||||||
                      (alist-cons 'key-download (string->symbol arg)
 | 
					                      (alist-cons 'key-download (string->symbol arg)
 | 
				
			||||||
                                  result))
 | 
					                                  result))
 | 
				
			||||||
                     (_
 | 
					                     (x
 | 
				
			||||||
                      (leave (_ "unsupported policy: ~a~%")
 | 
					                      (leave (_ "unsupported policy: ~a~%")
 | 
				
			||||||
                             arg)))))
 | 
					                             arg)))))
 | 
				
			||||||
         %standard-import-options))
 | 
					         %standard-import-options))
 | 
				
			||||||
| 
						 | 
					@ -99,7 +99,7 @@ Return a package declaration template for PACKAGE, a GNU package.\n"))
 | 
				
			||||||
       (with-error-handling
 | 
					       (with-error-handling
 | 
				
			||||||
         (gnu->guix-package name
 | 
					         (gnu->guix-package name
 | 
				
			||||||
                            #:key-download (assoc-ref opts 'key-download))))
 | 
					                            #:key-download (assoc-ref opts 'key-download))))
 | 
				
			||||||
      (_
 | 
					      (x
 | 
				
			||||||
       (leave (_ "wrong number of arguments~%"))))))
 | 
					       (leave (_ "wrong number of arguments~%"))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;;; gnu.scm ends here
 | 
					;;; gnu.scm ends here
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
 | 
					;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
 | 
				
			||||||
;;; Copyright © 2014 David Thompson <davet@gnu.org>
 | 
					;;; Copyright © 2014 David Thompson <davet@gnu.org>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
| 
						 | 
					@ -86,5 +86,5 @@ Import and convert the Nix expression ATTRIBUTE of NIXPKGS.\n"))
 | 
				
			||||||
         (format #t ";; converted from ~a:~a~%~%"
 | 
					         (format #t ";; converted from ~a:~a~%~%"
 | 
				
			||||||
                 (location-file loc) (location-line loc))
 | 
					                 (location-file loc) (location-line loc))
 | 
				
			||||||
         expr))
 | 
					         expr))
 | 
				
			||||||
      (_
 | 
					      (x
 | 
				
			||||||
       (leave (_ "wrong number of arguments~%"))))))
 | 
					       (leave (_ "wrong number of arguments~%"))))))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -118,7 +118,7 @@ determined."
 | 
				
			||||||
         (primitive-load file))))
 | 
					         (primitive-load file))))
 | 
				
			||||||
    (lambda args
 | 
					    (lambda args
 | 
				
			||||||
      (match args
 | 
					      (match args
 | 
				
			||||||
        (('system-error . _)
 | 
					        (('system-error . rest)
 | 
				
			||||||
         (let ((err (system-error-errno args)))
 | 
					         (let ((err (system-error-errno args)))
 | 
				
			||||||
           ;; Silently ignore missing file since this is a common case.
 | 
					           ;; Silently ignore missing file since this is a common case.
 | 
				
			||||||
           (if (= ENOENT err)
 | 
					           (if (= ENOENT err)
 | 
				
			||||||
| 
						 | 
					@ -129,7 +129,7 @@ determined."
 | 
				
			||||||
         (let ((loc (source-properties->location properties)))
 | 
					         (let ((loc (source-properties->location properties)))
 | 
				
			||||||
           (leave (_ "~a: ~a~%")
 | 
					           (leave (_ "~a: ~a~%")
 | 
				
			||||||
                  (location->string loc) message)))
 | 
					                  (location->string loc) message)))
 | 
				
			||||||
        (_
 | 
					        (x
 | 
				
			||||||
         (leave (_ "failed to load machine file '~a': ~s~%")
 | 
					         (leave (_ "failed to load machine file '~a': ~s~%")
 | 
				
			||||||
                file args))))))
 | 
					                file args))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -105,7 +105,7 @@
 | 
				
			||||||
                    ((or "interactive" "always" "never")
 | 
					                    ((or "interactive" "always" "never")
 | 
				
			||||||
                     (alist-cons 'key-download (string->symbol arg)
 | 
					                     (alist-cons 'key-download (string->symbol arg)
 | 
				
			||||||
                                 result))
 | 
					                                 result))
 | 
				
			||||||
                    (_
 | 
					                    (x
 | 
				
			||||||
                     (leave (_ "unsupported policy: ~a~%")
 | 
					                     (leave (_ "unsupported policy: ~a~%")
 | 
				
			||||||
                            arg)))))
 | 
					                            arg)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -300,7 +300,7 @@ Otherwise return #f."
 | 
				
			||||||
(define (narinfo-signature->canonical-sexp str)
 | 
					(define (narinfo-signature->canonical-sexp str)
 | 
				
			||||||
  "Return the value of a narinfo's 'Signature' field as a canonical sexp."
 | 
					  "Return the value of a narinfo's 'Signature' field as a canonical sexp."
 | 
				
			||||||
  (match (string-split str #\;)
 | 
					  (match (string-split str #\;)
 | 
				
			||||||
    ((version _ sig)
 | 
					    ((version host-name sig)
 | 
				
			||||||
     (let ((maybe-number (string->number version)))
 | 
					     (let ((maybe-number (string->number version)))
 | 
				
			||||||
       (cond ((not (number? maybe-number))
 | 
					       (cond ((not (number? maybe-number))
 | 
				
			||||||
              (leave (_ "signature version must be a number: ~s~%")
 | 
					              (leave (_ "signature version must be a number: ~s~%")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -247,7 +247,7 @@ messages."
 | 
				
			||||||
  "Report the failure to load FILE, a user-provided Scheme file.
 | 
					  "Report the failure to load FILE, a user-provided Scheme file.
 | 
				
			||||||
ARGS is the list of arguments received by the 'throw' handler."
 | 
					ARGS is the list of arguments received by the 'throw' handler."
 | 
				
			||||||
  (match args
 | 
					  (match args
 | 
				
			||||||
    (('system-error . _)
 | 
					    (('system-error . rest)
 | 
				
			||||||
     (let ((err (system-error-errno args)))
 | 
					     (let ((err (system-error-errno args)))
 | 
				
			||||||
       (report-error (_ "failed to load '~a': ~a~%") file (strerror err))))
 | 
					       (report-error (_ "failed to load '~a': ~a~%") file (strerror err))))
 | 
				
			||||||
    (('syntax-error proc message properties form . rest)
 | 
					    (('syntax-error proc message properties form . rest)
 | 
				
			||||||
| 
						 | 
					@ -264,7 +264,7 @@ ARGS is the list of arguments received by the 'throw' handler."
 | 
				
			||||||
  "Report the failure to load FILE, a user-provided Scheme file, without
 | 
					  "Report the failure to load FILE, a user-provided Scheme file, without
 | 
				
			||||||
exiting.  ARGS is the list of arguments received by the 'throw' handler."
 | 
					exiting.  ARGS is the list of arguments received by the 'throw' handler."
 | 
				
			||||||
  (match args
 | 
					  (match args
 | 
				
			||||||
    (('system-error . _)
 | 
					    (('system-error . rest)
 | 
				
			||||||
     (let ((err (system-error-errno args)))
 | 
					     (let ((err (system-error-errno args)))
 | 
				
			||||||
       (warning (_ "failed to load '~a': ~a~%") file (strerror err))))
 | 
					       (warning (_ "failed to load '~a': ~a~%") file (strerror err))))
 | 
				
			||||||
    (('syntax-error proc message properties form . rest)
 | 
					    (('syntax-error proc message properties form . rest)
 | 
				
			||||||
| 
						 | 
					@ -409,7 +409,7 @@ interpreted."
 | 
				
			||||||
          ("ZB"  (expt 10 21))
 | 
					          ("ZB"  (expt 10 21))
 | 
				
			||||||
          ("YB"  (expt 10 24))
 | 
					          ("YB"  (expt 10 24))
 | 
				
			||||||
          (""    1)
 | 
					          (""    1)
 | 
				
			||||||
          (_
 | 
					          (x
 | 
				
			||||||
           (leave (_ "unknown unit: ~a~%") unit)))))))
 | 
					           (leave (_ "unknown unit: ~a~%") unit)))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (call-with-error-handling thunk)
 | 
					(define (call-with-error-handling thunk)
 | 
				
			||||||
| 
						 | 
					@ -535,7 +535,7 @@ similar."
 | 
				
			||||||
error."
 | 
					error."
 | 
				
			||||||
  (match (read/eval str)
 | 
					  (match (read/eval str)
 | 
				
			||||||
    ((? package? p) p)
 | 
					    ((? package? p) p)
 | 
				
			||||||
    (_
 | 
					    (x
 | 
				
			||||||
     (leave (_ "expression ~s does not evaluate to a package~%")
 | 
					     (leave (_ "expression ~s does not evaluate to a package~%")
 | 
				
			||||||
            str))))
 | 
					            str))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue