gwl-devel
[Top][All Lists]
Advanced

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

Re: Guile code snippet


From: Olivier Dion
Subject: Re: Guile code snippet
Date: Wed, 20 Apr 2022 12:13:03 -0400

On Wed, 20 Apr 2022, Ricardo Wurmus <rekado@elephly.net> wrote:
> Hi Olivier,
>
>> Is there an easy way to do code snippet in Guile?  I currently do:
>> # { guile snippet.scm }
>
> The manual introduces how to use code snippets:
> https://guixwl.org/manual/html_node/Code-Snippets.html
>
> This
>
>   # { … }
>
> is just a shorthand for
>
>   # /bin/bash -c { … }
>
> You can use any interpreter after the hash, e.g.
>
>   # /bin/guile … { … }
>
> But you could just as well provide a quoted Scheme expression or an
> actual G-expression right there, e.g.
>
>    (procedure
>     `(call-with-output-file ,(first outputs)
>        (lambda (port)
>          (format port "Hello, world!~%"))))

This does not work in my case for example:

process guile-foo
  packages "guile" "guile-foo"
  procedure
    ` use-modules (foo)

| no code for module (libpatch patch)

and when I try the guile shebang:
# /bin/guile { (display "foo") }

| ERROR: In procedure %resolve-variable:
| Unbound variable: ungexp

-- 
Olivier Dion
oldiob.dev



reply via email to

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