![]() Previously, when trying to `enter!' into a module, an exception would abort the whole thing, leaving the repl where it was. This behavior can be very confusing: > (module foo racket/base (define x 123) (error "bleh!")) > (enter! 'foo) bleh! > x reference to undefined identifier: x > (enter! 'foo) > x 123 Things are a little better with xrepl, since the prompt always indicates the module that you're in. Still, it's unfortunate that a module with an error is more likely to be something you'd want to debug -- and most people are likely to miss the fact that entering a second time will work. So make `enter!' catch exceptions when requiring the module, change the namespace, and then re-raise the exception so the user sees it and is left in the expected namespace. |
||
---|---|---|
.. | ||
main.rkt | ||
wrapping-output.rkt | ||
xrepl.rkt |