unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: 50878@debbugs.gnu.org
Cc: Attila Lendvai <attila@lendvai.name>
Subject: [bug#50878] [PATCH 1/4] guix: build: Promote local define-inline to a define-constant util.
Date: Sun,  3 Oct 2021 14:43:00 +0200	[thread overview]
Message-ID: <20211003124303.8277-1-attila@lendvai.name> (raw)
In-Reply-To: <20210928214044.437-1-attila@lendvai.name>

* guix/build/utils.scm: Moved/renamed define-inline from grafts.scm to an
exported define-constant util.
---
 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 419c10195b..f3d913aa70 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -73,6 +73,8 @@
             list->search-path-as-string
             which
 
+            define-constant
+
             every*
             alist-cons-before
             alist-cons-after
@@ -112,6 +114,16 @@
 
             locale-category->string))
 
+\f
+;;;
+;;; 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)))
+
 \f
 ;;;
 ;;; Guile 2.0 compatibility later.
-- 
2.33.0





  parent reply	other threads:[~2021-10-03 12:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 21:40 [bug#50878] [PATCH] union: Resolve collisions by stable-sort'ing them Attila Lendvai
2021-09-29 13:48 ` Maxime Devos
2021-09-29 16:03   ` Attila Lendvai
2021-09-29 21:00     ` Maxime Devos
2021-09-29 17:42 ` Liliana Marie Prikler
2021-09-30  8:10   ` Attila Lendvai
2021-09-30  8:42     ` Maxime Devos
2021-09-30 14:00       ` Ludovic Courtès
2021-09-30 14:12       ` Attila Lendvai
2021-09-30 15:18         ` Maxime Devos
2021-09-30 18:13       ` Liliana Marie Prikler
2021-09-30 18:52     ` Liliana Marie Prikler
2021-10-03 12:43 ` Attila Lendvai [this message]
2021-10-03 12:43   ` [bug#50878] [PATCH 2/4] guix: build: Avoid using magic literals in the code for hash length Attila Lendvai
2021-10-03 12:43   ` [bug#50878] [PATCH 3/4] guix: build: Factor out and export default-collision-resolver Attila Lendvai
2021-10-03 12:43   ` [bug#50878] [PATCH 4/4] WIP guix: build: Add resolve-collision/alphanumeric-last for union Attila Lendvai
2021-10-03 12:59 ` [bug#50878] (No Subject) Attila Lendvai
2022-09-02 16:04   ` Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211003124303.8277-1-attila@lendvai.name \
    --to=attila@lendvai.name \
    --cc=50878@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).