[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Commit 4778c7326d726f50f6ac541322006d6b90795945
From: |
David Kastrup |
Subject: |
Re: Commit 4778c7326d726f50f6ac541322006d6b90795945 |
Date: |
Tue, 06 Dec 2011 15:30:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
David Kastrup <address@hidden> writes:
> "address@hidden" <address@hidden> writes:
>>
>> If one defines a music function incorrectly and then tries to use it, i.e. :
>>
>> foo =
>> #(define-music-function (parser location)
>> #{ a #})
>>
>> \foo
>>
>> One gets the following warning message:
>>
>> Parsing...
>> foo.ly:4:1: error: GUILE signaled an error for the expression beginning here
>> #
>> (define-music-function (parser location)
>> Unbound variable: clone
>> fatal error: failed files: "foo.ly"
> define-music-function could possibly try to check for the most likely
> programming errors and turn them into an error explicitly.
>
> Frog task.
Well, for a frog liking scheming. ly:make-music-function is too late,
and the body of define-syntax-function is partly not late enough (it's
not in the right lexical context to look at the defined-ness of
symbols), partly too late (if the whole macro replacement contains
undefined symbols later on, creating a useful error message at its start
might prove tricky).
Well, at least the guile command line has no problem with
(and #f barf barf barf)
so if one uses the right special forms, one might escape this niggle.
--
David Kastrup