gmauer
2021-10-10 21:50:40

if I can (require "foo.rkt") how do I list everything that the foo.rkt provides?


sorawee
2021-10-10 21:51:44

Are you looking for module->exports?


gmauer
2021-10-10 21:54:30

ah, yes I think so - now…uhh…what do I need to require for that to be visible?


gmauer
2021-10-10 21:54:46

the docs don’t seem to say?


sorawee
2021-10-10 21:56:09

It’s provided in racket/base, so you should be able to use it right away?


sorawee
2021-10-10 21:56:14

Unless you meant something else


gmauer
2021-10-10 21:56:54

oh, sorry, yeah, its there, I was misreading the error message


gmauer
2021-10-10 21:57:03

darn, got to go, my son is up from his nap. Thanks


gmauer
2021-10-11 01:41:04

Ah I see the issue. So I use my own emacs ob-racket package that I maintain (and I think no one else uses maybe?) https://github.com/togakangaroo/ob-racket to run it within org mode. So within it, I was emitting racket scripts to a temporary directory and running them but not setting the current working directory to be that folder.

So (require "adjacent-file.rkt") worked because it was relative to the current script (in the temp directory) but (module->exports "adjacent-file.rkt") failed because it was looking in cwd. It’s odd that the two functions would identify paths differently, but I can patch this quickly