summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-06-28 19:24:44 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-06-30 13:53:00 +0200
commitd9e0ae07db5cb9f949c11f4ee77146a070c2618c (patch)
treeeb4222919d1f19cf852f92ecea58fe4704d9d2a4 /doc
parentebf07a06f0a29eac6b5f115b10fc1eb7574f060c (diff)
guix: gexp: Define gexp->approximate-sexp.
It will be used in the 'optional-tests' linter. * guix/gexp.scm (gexp->approximate-sexp): New procedure. * tests/gexp.scm ("no references", "unquoted gexp", "unquoted gexp (native)") ("spliced gexp", "unspliced gexp, approximated") ("unquoted gexp, approximated"): Test it. * doc/gexp.scm ("G-Expressions"): Document it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index e0668b1f5f..e39e4eb7be 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10046,6 +10046,16 @@ corresponding to @var{obj} for @var{system}, cross-compiling for
has an associated gexp compiler, such as a @code{<package>}.
@end deffn
+@deffn {Procedure} gexp->approximate-sexp @var{gexp}
+Sometimes, it may be useful to convert a G-exp into a S-exp. For
+example, some linters (@pxref{Invoking guix lint}) peek into the build
+phases of a package to detect potential problems. This conversion can
+be achieved with this procedure. However, some information can be lost
+in the process. More specifically, lowerable objects will be silently
+replaced with some arbitrary object -- currently the list
+@code{(*approximate*)}, but this may change.
+@end deffn
+
@node Invoking guix repl
@section Invoking @command{guix repl}