[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Meaning of symbol prefixed with "#$"
From: |
N. Y. |
Subject: |
Re: Meaning of symbol prefixed with "#$" |
Date: |
Sat, 27 May 2023 23:31:16 +0000 |
Thanks so much for your suggestion! Can I ask for a name for these
notations, #~ and #$? I would like to learn more about them, but they are
difficult to Google for.
On Fri, May 26, 2023 at 7:17 PM Ricardo Wurmus <rekado@elephly.net> wrote:
>
> (Moving this to help-guix instead of guile-user.)
>
> "N. Y." <ningyuan.sg@gmail.com> writes:
>
> > (arguments
> > '(#:phases (modify-phases %standard-phases
> > (add-after 'unpack 'amend-version
> > (lambda _
> > (substitute* "setup.py"
> > (("versioneer.get_version\\(\\)")
> > (string-append "\"" #$version "\"")))))
>
> You can only use #$ inside an expression starting with #~. This should
> work:
>
> --8<---------------cut here---------------start------------->8---
> (arguments
> (list
> #:phases
> #~(modify-phases %standard-phases
> (add-after 'unpack 'amend-version
> (lambda _
> (substitute* "setup.py"
> (("versioneer.get_version\\(\\)")
> (string-append "\"" #$version "\""))))))))
> --8<---------------cut here---------------end--------------->8---
>
> --
> Ricardo
>