[Top][All Lists]

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

Re: [Chicken-users] hart and syntax-case won't play nice. :(

From: Kon Lovett
Subject: Re: [Chicken-users] hart and syntax-case won't play nice. :(
Date: Sat, 15 Mar 2008 12:45:54 -0700

On Mar 15, 2008, at 12:43 PM, John Cowan wrote:

Graham Fawcett scripsit:

 (define-macro (hart . forms)
  `(noop ,(apply hart-parse forms)))

 That should be trivial to translate into any macro system.

Hm, on second thought, I probably shouldn't assume that just because a
macro is short, it would be trivial to translate into another system.

This one is, though:

(define-syntax hart (syntax-rules ()
        ((hart . forms) (noop (hart-parse . forms)))))

(Untested, of course)

I am working on a hygienic version of hart.

    (define-syntax (hart X)
      (syntax-case X ()
        [(K FORM0 ...)
(with-syntax ([EXP (datum->syntax-object #'K (apply hart-parse (syntax-object->datum #'(FORM0 ...))))])
           #'(noop EXP) ) ] ) )

since the semantic is to do the parse at expansion time then execute at runtime.

The man that wanders far                        address@hidden
from the walking tree ~cowan
        --first line of a non-existent poem by:         John Cowan

Chicken-users mailing list

Best Wishes,

reply via email to

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