packages: Use '@' in package record printers.

* guix/packages.scm <package>: Use '@' in record printer.
* guix/import/cabal.scm <cabal-package>: Likewise
* guix/import/elpa.scm <elpa-package>: Likewise.
* tests/packages.scm: Adapt to it.
This commit is contained in:
Mathieu Lirzin 2016-01-24 17:42:39 +01:00
parent f3044a4b7b
commit 74e667d149
4 changed files with 5 additions and 5 deletions

View File

@ -608,7 +608,7 @@ If #f use the function 'port-filename' to obtain it."
(set-record-type-printer! <cabal-package> (set-record-type-printer! <cabal-package>
(lambda (package port) (lambda (package port)
(format port "#<cabal-package ~a-~a>" (format port "#<cabal-package ~a@~a>"
(cabal-package-name package) (cabal-package-name package)
(cabal-package-version package)))) (cabal-package-version package))))

View File

@ -121,7 +121,7 @@ REPO."
(set-record-type-printer! <elpa-package> (set-record-type-printer! <elpa-package>
(lambda (package port) (lambda (package port)
(format port "#<elpa-package ~a-~a>" (format port "#<elpa-package ~a@~a>"
(elpa-package-name package) (elpa-package-name package)
(elpa-package-version package)))) (elpa-package-version package))))

View File

@ -278,7 +278,7 @@ name of its URI."
(lambda (package port) (lambda (package port)
(let ((loc (package-location package)) (let ((loc (package-location package))
(format simple-format)) (format simple-format))
(format port "#<package ~a-~a ~a~a>" (format port "#<package ~a@~a ~a~a>"
(package-name package) (package-name package)
(package-version package) (package-version package)
(if loc (if loc

View File

@ -58,7 +58,7 @@
(test-begin "packages") (test-begin "packages")
(test-assert "printer with location" (test-assert "printer with location"
(string-match "^#<package foo-0 foo.scm:42 [[:xdigit:]]+>$" (string-match "^#<package foo@0 foo.scm:42 [[:xdigit:]]+>$"
(with-output-to-string (with-output-to-string
(lambda () (lambda ()
(write (write
@ -66,7 +66,7 @@
(location (make-location "foo.scm" 42 7)))))))) (location (make-location "foo.scm" 42 7))))))))
(test-assert "printer without location" (test-assert "printer without location"
(string-match "^#<package foo-0 [[:xdigit:]]+>$" (string-match "^#<package foo@0 [[:xdigit:]]+>$"
(with-output-to-string (with-output-to-string
(lambda () (lambda ()
(write (write