guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: doc: Mention quoting and keywords.


From: Ludovic Courtès
Subject: 01/01: doc: Mention quoting and keywords.
Date: Fri, 22 Jul 2016 12:41:05 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 654c0d97c9de4bf25b9facda1278835883555ae0
Author: Ludovic Courtès <address@hidden>
Date:   Fri Jul 22 14:39:29 2016 +0200

    doc: Mention quoting and keywords.
    
    Suggested by Vincent Legoll <address@hidden>.
    
    * doc/guix.texi (Defining Packages): Remove quasiquote in 'arguments'
    example.  Mention quoting and keywords, with references to Guile's
    manual.
---
 doc/guix.texi |   34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index e7b233d..393efab 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2387,7 +2387,7 @@ package looks like this:
                (base32
                 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
     (build-system gnu-build-system)
-    (arguments `(#:configure-flags '("--enable-silent-rules")))
+    (arguments '(#:configure-flags '("--enable-silent-rules")))
     (inputs `(("gawk" ,gawk)))
     (synopsis "Hello, GNU world: An example GNU package")
     (description "Guess what GNU Hello prints!")
@@ -2452,12 +2452,44 @@ The @code{arguments} field specifies options for the 
build system
 @var{gnu-build-system} as a request run @file{configure} with the
 @code{--enable-silent-rules} flag.
 
address@hidden quote
address@hidden quoting
address@hidden '
address@hidden quote
+What about these quote (@code{'}) characters?  They are Scheme syntax to
+introduce a literal list; @code{'} is synonymous with @code{quote}.
address@hidden Syntax, quoting,, guile, GNU Guile Reference Manual},
+for details.  Here the value of the @code{arguments} field is a list of
+arguments passed to the build system down the road, as with @code{apply}
+(@pxref{Fly Evaluation, @code{apply},, guile, GNU Guile Reference
+Manual}).
+
+The hash-colon (@code{#:}) sequence defines a Scheme @dfn{keyword}
+(@pxref{Keywords,,, guile, GNU Guile Reference Manual}), and
address@hidden:configure-flags} is a keyword used to pass a keyword argument
+to the build system (@pxref{Coding With Keywords,,, guile, GNU Guile
+Reference Manual}).
+
 @item
 The @code{inputs} field specifies inputs to the build process---i.e.,
 build-time or run-time dependencies of the package.  Here, we define an
 input called @code{"gawk"} whose value is that of the @var{gawk}
 variable; @var{gawk} is itself bound to a @code{<package>} object.
 
address@hidden backquote (quasiquote)
address@hidden `
address@hidden quasiquote
address@hidden comma (unquote)
address@hidden ,
address@hidden unquote
address@hidden ,@@
address@hidden unquote-splicing
+Again, @code{`} (a backquote, synonymous with @code{quasiquote}) allows
+us to introduce a literal list in the @code{inputs} field, while
address@hidden,} (a comma, synonymous with @code{unquote}) allows us to insert a
+value in that list (@pxref{Expression Syntax, unquote,, guile, GNU Guile
+Reference Manual}).
+
 Note that GCC, Coreutils, Bash, and other essential tools do not need to
 be specified as inputs here.  Instead, @var{gnu-build-system} takes care
 of ensuring that they are present (@pxref{Build Systems}).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]