Ciao,
  trying this:

(define-module (hurt-me)
  #:use-module (ice-9 syncase))

(define-syntax this
  (syntax-rules ()
    ((_ ?body ?handler)
     (catch #t ?body ?handler))))

(this (lambda ()
        (display 'ciao)
        (newline))
      (lambda (key . args)
        #f))

(define-syntax that
  (syntax-rules (body handler)
    ((_ (body ?args ?body)
        (handler ?handler-args ?handler))
     (catch #t
       (lambda ?args
         ?body)
       (lambda ?handler-args
         ?handler)))))

(this (body ()
        (display 'ciao)
        (newline))
      (handler (key . args)
        #f))

I get:

  ERROR: invalid syntax ()

from the first argument to BODY; if I change
'body ()' to 'body (a b)' the error becomes:

  ERROR: invalid syntax (key . args)

Why there is no error when using LAMBDA
but there is with custom keywords?

--
Marco Maggi

"Now feel the funk blast!"
Rage Against the Machine - "Calm like a bomb"




_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user

Reply via email to