From: ludo@gnu.org (Ludovic Courtès)
To: David Kastrup <dak@gnu.org>
Cc: 12341@debbugs.gnu.org
Subject: bug#12341: define does not support lambda shorthand notation, define-public does
Date: Mon, 03 Sep 2012 22:29:48 +0200 [thread overview]
Message-ID: <87zk56onnn.fsf@gnu.org> (raw)
In-Reply-To: <87ligrhti2.fsf@fencepost.gnu.org> (David Kastrup's message of "Mon, 03 Sep 2012 20:05:25 +0200")
Hi David,
David Kastrup <dak@gnu.org> skribis:
> scheme@(guile-user)> (define-public ((x a) b) a)
> scheme@(guile-user)> (define ((x a) b) a)
> While compiling expression:
> ERROR: Syntax error:
> unknown file:2:0: source expression failed to match any pattern in form (define ((x a) b) a)
For the latter, one should use (ice-9 curried-definitions), introduced
in 2.0 (see ‘NEWS’), with code like this:
(cond-expand (guile-2 (use-modules (ice-9 curried-definitions)))
(else #t)) ; Guile 1.8 and earlier supports it
That the former works is indeed inconsistent. It’s due to the fact that
‘define-public’ is implemented as a macro, whereas ‘define’ is a core
form.
I’m inclined to live with the inconsistency, but I’m open to
suggestions.
Thanks,
Ludo’.
PS: This was also discussed at
<http://thread.gmane.org/gmane.comp.gnu.lilypond.devel/31461>.
next prev parent reply other threads:[~2012-09-03 20:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 18:05 bug#12341: define does not support lambda shorthand notation, define-public does David Kastrup
2012-09-03 20:29 ` Ludovic Courtès [this message]
2012-09-04 12:21 ` Ian Price
2012-09-04 12:36 ` David Kastrup
2012-09-04 14:37 ` Ian Price
2012-09-05 21:16 ` Ludovic Courtès
2012-09-06 20:27 ` Ian Price
2012-09-06 20:37 ` Ludovic Courtès
2012-09-06 21:37 ` Ian Price
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=87zk56onnn.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=12341@debbugs.gnu.org \
--cc=dak@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).