Commit Graph

11 Commits

Author SHA1 Message Date
Eli Barzilay
1afc26c79b Fix test due to code refactoring, sort export lists in module descriptions. 2012-07-28 12:12:35 -04:00
Eli Barzilay
c2bea19d1b Adjust for new error mesage style.
(This is in part a temporary solution since the ",bt" command is now used
to show a backtrace as well as any "foo...:" hidden fields.)
2012-07-28 05:05:06 -04:00
Eli Barzilay
d28b0c0806 Use `scribble/text/wrap' in xrepl.
(Also organize the tests a little.)
2012-05-06 05:38:04 -04:00
Eli Barzilay
89dee6f6c1 Xrepl improvements, mainly around the treatment of module names.
* Get rid of the concept of `modspec': `getarg' now has `require' for
  require specs and `module' for a module name (the latter is what all
  previous uses of 'modspec except for ,require really needed); command
  descriptions use "<require-spec>" and "<module>", documentation
  adjusted as well.

* `module-name?' etc turn to `known-module' and `known-module-name',
  with a saner behavior, and tests to keep it sane.

* This cleans up a lot of things.  Two specific points: ,switch works
  better with toplevel-defined modules (see the corresponding change in
  the test suite), and also fixes PR 12148.

* Ensure that ,sh commands return void.

* Add tests for ,r with non-atomic require spec, and for use of $F in
  ,sh commands.

* Improved the test suite, including uses of `module+' so each file can
  be run by itself to perform a subset of the tests.
2012-03-25 20:57:52 -04:00
Eli Barzilay
c5b3317daf Make `enter!' go into a module even if there was an error when it was instantiated.
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.
2011-09-16 11:31:41 -04:00
Vincent St-Amour
e61d472ed3 Fix xrepl tests. 2011-09-13 17:29:47 -04:00
Eli Barzilay
6e50ecad99 Add $1', $2', ..., `$5' as last-value references. 2011-08-26 09:42:56 -04:00
Eli Barzilay
cda4479d1e Hold the saved values weakly. 2011-08-26 09:10:46 -04:00
Eli Barzilay
6203f53ef6 Syntax-based implementation for saved values, finally working. 2011-08-26 05:26:46 -04:00
Eli Barzilay
2bc2050c08 Fix when showing the description of a module.
Set `current-load-relative-directory' to the path of the module file so
paths that it resolves in the description (in `describe-modeul') are not
bogus.
2011-08-22 07:49:49 -04:00
Eli Barzilay
e52e7defae Much improved `wrapped-output'. 2011-08-02 16:56:02 -04:00