unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#12341: define does not support lambda shorthand notation, define-public does
@ 2012-09-03 18:05 David Kastrup
  2012-09-03 20:29 ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: David Kastrup @ 2012-09-03 18:05 UTC (permalink / raw)
  To: 12341


Having this supported in define-public but not in define seems like an
inconsistency:


dak@lola:/usr/local/tmp/lilypond$ guile
GNU Guile 2.0.5-deb+1-1
Copyright (C) 1995-2012 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)> (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)
scheme@(guile-user)> 

The Scheme report does not mention this explicitly, but it would appear
as a recursive application of the rule
(define (a b) ...) -> (define a (lambda (b) ...))

leading first to

(define (x a) (lambda (b) a))

and thence to

(define x (lambda (a) (lambda (b) a)))

And if it is not supposed to be supported, why is it supported with
define-public?

-- 
David Kastrup





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-09-06 21:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).