guile-user
[Top][All Lists]
Advanced

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

let-syntax Problem


From: Volkan YAZICI
Subject: let-syntax Problem
Date: Wed, 18 Oct 2006 18:32:24 +0300
User-agent: Mutt/1.4.2.1i

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.




reply via email to

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