Hi David,
David Kastrup <[email protected]> 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>.