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



Reply via email to