guile-user
[Top][All Lists]
Advanced

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

Why does compile discard multiple values?


From: Jean Abou Samra
Subject: Why does compile discard multiple values?
Date: Wed, 10 Aug 2022 15:01:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0

Hi,

See:

$ guile3.0
GNU Guile 3.0.7
Copyright (C) 1995-2021 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (eval '(values 1 2) (current-module))
$1 = 1
$2 = 2
scheme@(guile-user)> (use-modules (system base compile))
scheme@(guile-user)> (compile '(values 1 2) #:env (current-module))
$3 = 1


Is it expected that compile doesn't cope with a return of
multiple values?

I can work around that using

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

but I would have expected it to work out of the box. Should
I raise it on the bug tracker?

Thanks,
Jean




reply via email to

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