[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/06: guix: build: Promote local define-inline to a define-constant uti
From: |
guix-commits |
Subject: |
04/06: guix: build: Promote local define-inline to a define-constant util. |
Date: |
Fri, 2 Sep 2022 11:57:59 -0400 (EDT) |
lilyp pushed a commit to branch core-updates
in repository guix.
commit 54c365d6457fd19479f3cea797196240a73299bf
Author: Attila Lendvai <attila@lendvai.name>
AuthorDate: Sun Oct 3 14:43:00 2021 +0200
guix: build: Promote local define-inline to a define-constant util.
* guix/build/utils.scm: Moved/renamed define-inline from grafts.scm to an
exported define-constant util.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
guix/build/graft.scm | 5 +----
guix/build/utils.scm | 12 ++++++++++++
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/guix/build/graft.scm b/guix/build/graft.scm
index f04c35fa74..daac958d4f 100644
--- a/guix/build/graft.scm
+++ b/guix/build/graft.scm
@@ -44,10 +44,7 @@
;;;
;;; Code:
-(define-syntax-rule (define-inline name val)
- (define-syntax name (identifier-syntax val)))
-
-(define-inline hash-length 32)
+(define-constant hash-length 32)
(define nix-base32-char?
(cute char-set-contains?
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 5ea3b98353..3570de81e9 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -90,6 +90,8 @@
search-error-path
search-error-file
+ define-constant
+
every*
alist-cons-before
alist-cons-after
@@ -130,6 +132,16 @@
locale-category->string))
+;;;
+;;; Syntax
+;;;
+
+;; Note that in its current form VAL doesn't get evaluated, just simply
+;; inlined. TODO?
+(define-syntax-rule (define-constant name val)
+ (define-syntax name (identifier-syntax val)))
+
+
;;;
;;; Guile 2.0 compatibility later.
;;;
- branch core-updates updated (08380429b8 -> 42e3089752), guix-commits, 2022/09/02
- 05/06: guix: build: Avoid using magic literals in the code for hash length., guix-commits, 2022/09/02
- 04/06: guix: build: Promote local define-inline to a define-constant util.,
guix-commits <=
- 06/06: guix: build: Factor out default collision-resolver., guix-commits, 2022/09/02
- 01/06: gnu: gtk: Add missing input., guix-commits, 2022/09/02
- 02/06: gnu: gtksourceview: Update to 5.4.2., guix-commits, 2022/09/02
- 03/06: gnu: Make gtksourceview-5 the default gtksourceview., guix-commits, 2022/09/02