bug-guix
[Top][All Lists]
Advanced

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

bug#36547: expect an earlier/clearer error when trying to splice(?) a fu


From: Ludovic Courtès
Subject: bug#36547: expect an earlier/clearer error when trying to splice(?) a function into a gexp
Date: Thu, 11 Jul 2019 18:06:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Robert Vollmert <address@hidden> skribis:

> I tried to use a function in a gexp along the lines of
>
> (define* (f x) …)
>
> #~(begin
>      (#$f x)
>      …)
>
> This resulted in the following error:
>
> ERROR: In procedure primitive-load:
> In procedure scm_lreadr: 
> /gnu/store/wcw0fii855axkiqfz05283rwl7nlrb3i-puzzledb-blogs-job-builder:1:254: 
> Unknown # object: #\<
>
> where the referenced builder file contains
>
> … (let ((backend (#<procedure read-secret (file)> "tools.token"))) …
>
> It seems to me that whatever code writes the builder file should already 
> complain at the point
> where it substitutes #<procedure read-secret (file)> — is that possible?

I think ‘gexp->sexp’ should simply error out whenever an object that
lacks a read syntax (like a procedure) is inserted in a gexp.

Ludo’.





reply via email to

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