Consider the following setup:

The file "my-file.rkt" is a #lang racket module which contains some
definitions of some procedures. Running this file may have some side
effects.

In particular it contains some definitions like:
(my-define my-proc
    ([property1 "some value"] ; some properties of my-proc
     [property2 12])
    (lambda (x) (displayln x) 3)) ; the actual procedure

where 'my-define' is for me to define.

>From the second file "loader.rkt" (which interacts with the user), I would
like to retrieve the property-s of each form declared with 'my-define' in
"my-file.rkt", *without* running the file (not even sandboxed, that is, it
must be fast).

The purpose is to tell the user what are the different my-procs in
my-file.rkt, along with its properties, so that s/he can choose whether to
evaluate the corresponding procedure.

I've played with 'dynamic-require' and submodules with some limited success
but couldn't achieve the goal above. Any idea?

(Also, I have several files like 'my-file.rkt' that the user can choose
from.)

Thanks,
Laurent

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to