unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Jean Abou Samra <jean@abou-samra.fr>
To: Guile User <guile-user@gnu.org>
Subject: Why does compile discard multiple values?
Date: Wed, 10 Aug 2022 15:01:00 +0200	[thread overview]
Message-ID: <9f083148-6764-5943-9042-665e2b1c6099@abou-samra.fr> (raw)

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	other threads:[~2022-08-10 13:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 13:01 Jean Abou Samra [this message]
2022-08-10 13:11 ` Why does compile discard multiple values? Jean Abou Samra
2022-08-10 13:20   ` Jean Abou Samra
2022-08-10 18:08 ` Maxime Devos
2022-08-10 18:11   ` Jean Abou Samra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f083148-6764-5943-9042-665e2b1c6099@abou-samra.fr \
    --to=jean@abou-samra.fr \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).