I'm writing a racket module in a certain file. I would like to be able to test and eval the definitions in this module with some interactively-evaluated code, a bit like one would in the repl, but with code saved in another file, so I don't have to type it out each time.
In the repl this works because one can set the repl's namespace. Is it possible to set a file buffer to eval its statements in another module's namespace, or for two file buffers to share a namespace? (And if it isn't possible, how hard would it be to hack into geiser?) Of course, using 'require' to load the definitions from the module file makes them available in my testing file, but this only loads them the first time. I would like to be able to load the module, test the files, tinker with the definitions, re-test, re-tinker, etc. This workflow doesn't work that well if I have to restart the racket process every time I want to redefine something. I tinkered a little bit with enter! and dynamic-rerequire, but couldn't get them to behave as I would like. I'm new to racket and don't really understand the module system yet, so my apologies if I am overlooking an obvious solution to this issue there. Many thanks, James