unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Germán A. Arias" <german@xelalug.org>
To: Daniel Llorens <daniel.llorens@bluewin.ch>
Cc: guile-user@gnu.org
Subject: Re: case-lambda* question
Date: Wed, 14 Nov 2012 11:53:11 -0600	[thread overview]
Message-ID: <1352915591.1707.2.camel@german-desktop> (raw)
In-Reply-To: <7A088671-9922-4ECF-A5C5-841AEFDBCA80@bluewin.ch>

El mié, 14-11-2012 a las 11:20 +0100, Daniel Llorens escribió:
> 
> Is this the test?
> 
> (pass-if "case-lambda*"
>        (null? (call-with-warnings
>                 (lambda ()
>                   (compile '(let ((f (case-lambda*
>                                        ((x #:optional y) 1)
>                                        ((x #:key y)      2)
>                                        ((x y #:key z)    3))))
>                               (list (f 1)
>                                     (f 1 2)
>                                     (f #:y 2)
>                                     (f 1 2 #:z 3)))
>                            #:opts %opts-w-arity
>                            #:to 'assembly)))))
> 

Right.

> I also get an error here. Strangely, I can run make check without anything being reported. I get a warning 
> 
> UNRESOLVED: tree-il.test: warnings: unused-toplevel: used by macro

I can run now the tests, and this test in particular passes without
problem. But I don't know why.

> 
> But I still don't understand how case-lambda* works or should work. The error is in the last call (f 1 2 #:z 3). If I remove it I get '(1 1 1), but how can (f #:y 2) match (x #:optional y) ??
> 
> I'm running acc1d8… but this test has been in there since 2009 apparently.
> 





  reply	other threads:[~2012-11-14 17:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 13:54 case-lambda* question Daniel Llorens
2012-11-13  2:46 ` Daniel Hartwig
2012-11-14  0:55   ` Germán A. Arias
2012-11-14 10:20   ` Daniel Llorens
2012-11-14 17:53     ` Germán A. Arias [this message]
2012-11-15  1:01       ` Germán A. Arias
2013-01-14  9:41         ` Andy Wingo
2012-11-15  1:22     ` Daniel Hartwig
2012-11-19  9:43       ` Daniel Llorens
2013-01-14  9:39     ` Andy Wingo
2013-01-14 10:39 ` Andy Wingo
2013-01-14 12:22   ` Ludovic Courtès
2013-01-15 12:01   ` Daniel Llorens

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=1352915591.1707.2.camel@german-desktop \
    --to=german@xelalug.org \
    --cc=daniel.llorens@bluewin.ch \
    --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).