Remark for future readers:
This is missing in module-begin
[(local-state-new-id ...)
(generate-temporaries #'(local-state-id ...))]
On Tue, 28 May 2013 14:33:50 +0200, Jay McCarthy
wrote:
I would personally go with the syntax-parameter approach.
Another option is:
(define-syn
I thought that the syntax-parameter approach with macros would add
complexity to functions with optional and/or keyword arguments. But your
solution with parameterizing over the state and then the functions solves
my problem completely.
Thanks for sharing this excellent solution!
On Tue,
I would personally go with the syntax-parameter approach.
Another option is:
(define-syntax (module-begin stx)
(syntax-case stx ()
[(_ . body)
(with-syntax
([add (datum->syntax stx 'add)]
[get (datum->syntax stx 'get)])
(syntax/loc stx
(#%module-begin
3 matches
Mail list logo