The previous version was broken in its inconsistent treatment of
multiple values, which was motivated by an `in-generator' use
case. (`in-generator' should be fixed too now.) The new version is
much simpler since there's no need for three almost-exact copies of the
same code.
There are many cases where you just want to use some other tool like
`#:break' to stop the iteration, so no need to make up a bogus stop
value and no need to spend time checking it.
Mainly reogranize the code + exports + docs of the additional list
convenience functions.
Also, add a custom printer to a "running" struct in
`racket/private/promise', so there's a sensible output if the value
happens to leak outside of a promise (eg, when debugging).
Matthew suggests that using exceptions for failure
in the implementation of `subtype` is a performance
problem. This commit removes all use of exceptions
for failure in subtype.rkt, replacing it with the
standard Racket #f/value option.
Extensive use is made of the `subtype-seq` form,
which is basically do-notation for the subtyping
monad.
Creating a stand-alone executable could slow down a program,
because bytecode embedded in an executable was not treated
in the same way as bytecode loaded from files. The difference
was in on-demand parsing of bytecode --- and now it's enabled
for embedded bytecode, too.
The indirection uses a "local-redirect.js" script to rewrite
the document links to local links within the browser. This mechanism
is a step towards distributing compiled packages that include
already-built documentation, where paths to other documentation
can be different than in the build environment.
If the links are not rewritten, they are queries to
"pkg-docs.racket-lang.org", with the idea tha such a server will exist
for reading all package documentation online. Also, a package's
documentation that refer to documentation for uninstalled packages,
in which case the corresponding links will not get rewritten and
will continue to point to the server.
Rendering the "local-redirect.js" script spends a lot of time just
converting among different path formats. Various library changes in
this commit are aimed at speed up those conversions, but the big
improvement came from a `path->url-string' that shortcuts conversion
os simple Unix paths.
The revised `explode-path' runs in time proportional to the
length of the path, instead of quadratic in the number of
path elements. The difference doesn't matter much in my
program, but I'm reluctant to leaving the implementation
as quadratic (which is forced by using `split-path').