Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This greatly aids traversing the documentation: readers of this module's make-cookie can now jump to the documentation of the wrapped function instead of jumping to net/cookies/server and scrolling or searching. One possible solution is to prefix the special name like "net:make-cookie": the only downside is that the link will display as "net:make-cookie" instead of "make-cookie"; see the GUI Easy documentation [1] as an example (e.g., "gui:dc<%>" in "Custom Views"). In that document, all racket/gui exports are prefixed with gui: to avoid ambiguity, and the links take you to the correct place within racket/gui documentation. That is accomplished by (require (for-label (prefix-in gui: racket/gui))) which I wanted to avoid here: I didn't want all references to net/cookies/server to use the net: prefix, and it is desirable for the docs to show "make-cookie". Thus instead we use a trick (by way of Sorawee and Matthew Flatt) to embed the require-for-label in a macro use [2]. [1]: https://docs.racket-lang.org/gui-easy/index.html [2]: https://github.com/racket/racket/blob/f2294a69784a5e77e83d8cf07d6cddab7f1b09fd/pkgs/racket-doc/syntax/scribblings/module-reader.scrbl#L10
- Loading branch information