guile-user
[Top][All Lists]
Advanced

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

Re: let-syntax Problem, do a binary search


From: Alan Grover
Subject: Re: let-syntax Problem, do a binary search
Date: Wed, 18 Oct 2006 16:08:14 -0400
User-agent: Thunderbird 1.5.0.7 (X11/20060922)

Run guile with --debug to give stack-dumps, then peruse for the actual
location.

However, if the error is during "read", the stack is less useful. It
might tell you what module was being loaded (look for "load" or
"primitive-load", etc.)

The reader should tell use something about the problem. But, it doesn't.
So, do a binary search in the offending file:

Comment out the bottom "half" of the file with #!...!# (block comments).
 Careful to comment out whole forms!

Try again.

If you get the same error, move the top comment half-way up. Try again.

if you don't get the error, make your comment half its size. Try again.

Volkan YAZICI wrote:
> Hi,
> 
> Can somebody help me to figure out the syntax error in below let-syntax
> scope:
> 
> (let-syntax
>   ((case-cond
>      (syntax-rules ()
>        ((case-cond
>           key
>           testfn
>           (items1 action1)
>           (items2 action2)
>           ...)
>         (begin
>           (define (filter items ret)
>             (cond
>               (ret #t)
>               ((null? items) #f)
>               (else (filter
>                       (cdr items)
>                       (testfn key (car items))))))
>           (cond
>             ((filter items1 #f) action1)
>             ((filter items2 #f) action2)
>             ...))))))
> 
>   (case-cond
>     "example"
>     (lambda (key item) (string=? key item))
>     ('("exa" "exam") (display "failed\n"))
>     ('("examp" "example") (display "ok\n"))))
> 
> mzscheme executes above code without any problem while guile raises 
> 
>   ERROR: invalid syntax ()
>   ABORT: (misc-error)
> 
> error. (Isn't it possible to increase the verbosity of above error
> message? You see, it's quite unuseful.)
> 
> 
> Regards.
> 
> 
> _______________________________________________
> Guile-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/guile-user
> 




reply via email to

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