guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unknown location: definition in expression context in subform optnam


From: Bruce Korb
Subject: Re: unknown location: definition in expression context in subform optname-from of "_^"
Date: Thu, 26 Jan 2012 16:56:21 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0

On 01/26/12 16:10, Mark H Weaver wrote:
   unknown location: definition in expression context in subform optname-from
of "_^"

The other interesting thing here is that the error message above says
"_^" instead of the full string "A-Z_^".  That suggests that the string
literal was not properly read.

Bruce, are you sure that the following expression was passed directly to
'eval' or 'primitive-eval'?

I am completely certain.  Unfortunately, though the string now looks like this:

(define opt-name       "")
(define extra-ct       0)
(define extra-text     "")
(define optname-from   "A-Z_^")
(define optname-to     "a-z--")
(make-tmp-dir)

(if (exist? "preserve-case") (begin
  (set! optname-from "_^")
  (set! optname-to   "--") ))

Upon careful examination of the entire, not-clipped string,
I know at one point those "set!" used to be "define".
Then I got bit, went through several fixup cycles and an old version
must have been copied into place.  Sorry for the bother.

PS: As a side note to the Guile developers: the error message here is
     misleading, because in the call to 'syntax-violation' within the
     'define*' cases of 'expand-expr', the bound identifier is passed as
     the 'subform' and the bound value is passed as the 'form'.
     Unfortunately, there is no way to fix this without changing the
     values that 'syntax-type' returns for 'define*' forms.

Too bad.  I do prefer clue-ful error messages and "unknown location"
just wasn't the helpful clue I needed.  Perhaps just use "improper location"?
"invalid location"?  Just not "unknown location".  It sounds like Guile is out
in the weeds and cannot really tell me what's awry.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]