DRAFT serialization: Avoid 'define-values', for the sake of Guile 2.0.

DRAFT: We should probably just use 'let-values' instead.

* guix/serialization.scm (define-values) [not guile-2.2]: New macro.
This commit is contained in:
Ludovic Courtès 2019-12-11 23:50:13 +01:00
parent eb8eba95da
commit b446a604b4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -287,6 +287,21 @@ order."
string<?)
string=?))
(cond-expand
((not guile-2.2)
;; Guile 2.0 lacks 'define-values'.
(define-syntax define-values
(syntax-rules ()
((_ (a b) exp)
(begin
(define a #f)
(define b #f)
(call-with-values (lambda () exp)
(lambda (x y)
(set! a x)
(set! b y))))))))
(else #t))
(define* (write-file-tree file port
#:key
file-type+size