unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Tomas Nordin <tomasn@posteo.net>
To: 75860@debbugs.gnu.org
Subject: bug#75860: Somewhat confusing exception message with append
Date: Sun, 26 Jan 2025 13:04:04 +0000	[thread overview]
Message-ID: <87r04pk9q3.fsf@posteo.net> (raw)

Hello Guile!

As expected, the following raises an exception:

    (append 'a '(b) '()) =>
    ice-9/boot-9.scm:1676:22: In procedure raise-exception:
    In procedure append: Wrong type argument in position 1 (expecting empty list): a

And so does this:

    (append '(a) 'b '()) =>
    ice-9/boot-9.scm:1676:22: In procedure raise-exception:
    In procedure append: Wrong type argument in position 1 (expecting empty list): b

Note that the a-thing is the first and the b-thing the second argument
in both calls. 'a is at fault in the first and 'b is at fault in the
second call.

But, in both cases the faulty argument is reported to be in position 1.
I would expect maybe position 2 to be complained about from the second
call.

Also, I wonder why we are "(expecting empty list)" in place of the
non-list things?

I made the above observations, if it's a bug or not, I don't know.

(version) => "3.0.9.140-d8df3-dirty"

Have a great Sunday
--
Tomas





             reply	other threads:[~2025-01-26 13:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-26 13:04 Tomas Nordin [this message]
2025-03-18 18:28 ` bug#75860: Somewhat confusing exception message with append Rob Browning
2025-03-19 23:09   ` Tomas Nordin
2025-03-20  2:41     ` Rob Browning

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=87r04pk9q3.fsf@posteo.net \
    --to=tomasn@posteo.net \
    --cc=75860@debbugs.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).