[racket] Internal definition context

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Mon Jan 14 13:32:32 EST 2013

Hi,

2013/1/14 Matthew Flatt <mflatt at cs.utah.edu>:
> At Mon, 14 Jan 2013 01:21:46 +0100, Jens Axel Søgaard wrote:
>> Hi All,
>>
>> I'd like to change the program below s.t. the
>> local-expand uses an internal definition context.
>> Simply changing 'top-level to 'module does not work.
>>
>> I have tried to use various combinations of
>>   - (generate-expand-context #t)
>>   - syntax-local-make-definition-context
>>   - syntax-local-bind-syntaxes
>> without hitting the right incantation.
>>
>> Any hints are welcome.
>
> I think you need to stop local expansion at `define-values', recognize
> definitions in the expansion, use `syntax-local-bind-syntaxes', and
> finally use `internal-definition-context-apply' on the expressions.

Thanks. The bits and pieces are falling into place.

/Jens Axel


Posted on the users mailing list.