Le 10/08/2022 à 15:11, Jean Abou Samra a écrit :


Le 10/08/2022 à 15:01, Jean Abou Samra a écrit :
I can work around that using

((compile `(lambda () ,my-form)
          #:env (current-module)))


Ugh, no, I can't. The form might be a define.

Does anybody know of a workaround?



OK, digging into the implementation, I found

scheme@(guile-user)> (use-modules (system vm loader))
scheme@(guile-user)> ((load-thunk-from-memory (compile '(values 1 2) #:to 'bytecode #:env (current-module))))
$1 = 1
$2 = 2

If someone has a better workaround, I'm still interested.


Reply via email to