Hi, zimoun skribis: > On Sat, 24 Sep 2022 at 20:40, Csepp wrote: > >> As you can see, that is an unqouted list. The fix should be pretty >> simple: just add an extra quote. Haven't tested it, but one of these >> should work: >> ``` >> (define (something) ''(42)) >> ;; or >> (quote #+(something)) >> ``` > > The extra quote does not work. I think Csepp was on the right track though. Attached is a version where I added that quote: #~(begin … (define that '#+(something)) …) AFAICS, that was the only fix that needed to be made. (I also removed (json) from the imported modules; it’s already taken care of by ‘with-extensions’.) Pro tip: to debug code staging issues like this, where you end up staging code that doesn’t behave as you would expect, it’s useful to check what the staged code looks like, like so: --8<---------------cut here---------------start------------->8--- $ cat $(guix gc -R $(guix build -m /tmp/zimoun.scm -d)|grep example-json-build) (begin (use-modules (guix build utils) (json)) (define that (quote (42 43 44))) (define file-name (string-append ((@ (guile) getenv) "out") "/example.json")) (mkdir-p (dirname file-name)) (with-output-to-file file-name (lambda () (scm->json (list->vector that))))) --8<---------------cut here---------------end--------------->8--- That ‘example-json-builder’ file contains the staged version of your code. We can see '(42 43 44) there; if we remove the quote mentioned above, we get: (define that (42 43 44)) which leads to a wrong-type-to-apply error. HTH! Ludo’.