
dsmith
2021-12-10 19:32:31
Hello Racket people! Is there a way to enumerate the symbols provided by a source file within the file itself? In other words, how could I implement get-all-provided-objects-in-this-file
in this example? #lang racket/base
(provide (all-defined-out))
(define chickens "squawk")
(define dogs "bark")
;; (define (get-all-provided-objects-in-this-file)
;; ???)
(for ([obj (get-all-provided-objects-in-this-file)])
(display obj))
I think that module-compiled-exports
lives in the same neighborhood as what I’m looking for, but I can’t find what I’m seeking.

soegaard2
2021-12-10 19:33:48
@dsmith I think, you are looking for module->exports
.