[Top][All Lists]

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

Re: hygiene and macro-introduced toplevel bindings

From: Ludovic Courtès
Subject: Re: hygiene and macro-introduced toplevel bindings
Date: Mon, 28 Feb 2011 23:32:05 +0100
User-agent: Gnus/5.110013 (No Gnus v0.13) Emacs/23.2 (gnu/linux)


Andy Wingo <address@hidden> writes:

> But you have to, I think.  If that module that contained the above
> define-syntactic-accessor expansion exports "foo", then in another
> module you have:
>   (define bar (lambda () (foo)))
> which expands to
>   (define bar (lambda () val-234123))
> Val needs to be named.

FWIW I had this problem back when ‘define-wrapped-pointer-type’
generated the SRFI-9 record name (recall that SRFI-9 accessors,
constructors, and type predicates are macros, which refer to the global
variable that holds the vtable.)

The solution I chose was to let users provided the record name, like
‘define-record-type’ does (de6fb1875d1a7e8d2a39ec8eba753c07abcd4263).


reply via email to

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