[racket] compile time (file read -> define function)
Please disregard, this makes no sense. How would the code refer to
functions that may or may not exist? I forgot the macro was just
converting a call like (get-function 'name) directly into allowing (name),
so ultimately some sort of lookup is needed.
On Thu, Apr 24, 2014 at 8:17 PM, Sean Kanaley <skanaley at gmail.com> wrote:
> I have:
>
> 1. a macro to define functions
>
> (define-syntax the-macro
> ...
> #'(define (name) ...))
>
> 2. a file filled with "user" definitions in expression form
>
> (this is a definition that shall be passed to the macro)
> (so is this)
> ...
>
> 3. I would like to do something to the effect of
>
> (define-namespace-anchor nsa)
> (with-input-from-file ...
> (λ ()
> (eval `(the-macro ,@(read))
> (namespace-anchor->namespace nsa))))
>
> which works, but then I cannot provide the defined functions as they
> happen at phase runtime compile shift meta 34 (?). Is there some way to
> sort of pre-run the file reading so the definitions already exist for
> exporting?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140424/907fb3a3/attachment.html>