Re: [racket-dev] Strange problem with `check-docs' and `#:use-sources'
On Wed, Jun 22, 2011 at 6:53 PM, Robby Findler ro...@eecs.northwestern.edu wrote: To really know what is going on, one has to trace thru the re-provides for each of these identifiers and match them up to the declare-exporting declarations. In the declaration below, you're essentially saying any identifiers documented in this module should appear to come from the typed/scheme/base, typed/scheme, and typed-scheme modules, but they are really actually exported from one of the modules listed in the #:use-sources keyword which means, to the documentation system that any module that re-exports an identifier from, say, typed-scheme/base-env/base-types-extra, will have its documentation attached to the docs in the file with the declare-exporting below and the docs system will then point userse to typed/scheme/base. I don't think that this is what you want, since you probably want to to point people to typed/racket. That's not what's going on here, although you couldn't tell that from my email. That `declare-exporting' is in a subsection which only documents `typed/scheme' etc, and not any of the actual forms in Typed Racket. To know what the right answer is for the declare-exporting below, I'd have to know how typed/racket fits into the picture. In particular, is it re-exporting things from typed/scheme? Or from those helper modules you have listed? Or from some other place? It's probably easier to just consider `typed/racket/base' and `typed/scheme/base' here. Both of them export identifiers from the modules listed in the `declare-exporting' declaration. For example, `with-handlers' is defined in `typed-scheme/base-env/prims'. Here's what the documentation for `typed/racket/base' looks like: @(defmodulelang* (typed/racket/base typed/racket) #:use-sources (typed-scheme/typed-scheme typed-scheme/base-env/prims typed-scheme/base-env/extra-procs typed-scheme/base-env/base-types typed-scheme/base-env/base-types-extra)) Also, I don't think this is a problem with the general setup of documentation for Typed Racket. In particular, the identifier `define-type' is defined in the same module as `with-handlers', and it gets handled properly by Scribble, by DrRacket, and by `check-docs'. You can see this by searching for `define-type' in the documentation, or for `U', which is defined in the same module as `-'. Instead, I think the problem is that `with-handlers' and `-' are both identifiers exported from `racket', and this is causing some sort of confusion in the Scribble doc system, but I don't know exactly what, and I'm therefore confused about how to try to fix it. Of course, it might be something totally different, also -- the vagaries of Scribble linking are still opaque to me. Robby On Thu, Jun 23, 2011 at 3:16 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: Currently, the documentation completeness checker (a wonderful tool; thanks, Robby!) for Typed Racket complains that `-' and `with-handlers' are not documented when provided from `typed/scheme', `typed/scheme/base', and `typed-scheme'. However, these identifiers are fine when provided from `typed/racket', and are both defined in modules where `check-docs' finds the documentation for other things just fine, such as `define:' and `All'. The documentation looks like this: (declare-exporting typed/scheme/base typed/scheme typed-scheme #:use-sources (typed-scheme/typed-scheme typed-scheme/base-env/prims typed-scheme/base-env/extra-procs typed-scheme/base-env/base-types typed-scheme/base-env/base-types-extra)) where `-' is defined in `typed-scheme/base-env/base-types-extra' and `with-handlers' is defined in `typed-scheme/base-env/prims'. Is there something else I should be doing here? Is there a bug in `check-docs'? -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Strange problem with `check-docs' and `#:use-sources'
Is the with-handlers that typed/racket exports the same identifier as the one exported by racket, or is it a different binding? Robby On Fri, Jun 24, 2011 at 2:46 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Wed, Jun 22, 2011 at 6:53 PM, Robby Findler ro...@eecs.northwestern.edu wrote: To really know what is going on, one has to trace thru the re-provides for each of these identifiers and match them up to the declare-exporting declarations. In the declaration below, you're essentially saying any identifiers documented in this module should appear to come from the typed/scheme/base, typed/scheme, and typed-scheme modules, but they are really actually exported from one of the modules listed in the #:use-sources keyword which means, to the documentation system that any module that re-exports an identifier from, say, typed-scheme/base-env/base-types-extra, will have its documentation attached to the docs in the file with the declare-exporting below and the docs system will then point userse to typed/scheme/base. I don't think that this is what you want, since you probably want to to point people to typed/racket. That's not what's going on here, although you couldn't tell that from my email. That `declare-exporting' is in a subsection which only documents `typed/scheme' etc, and not any of the actual forms in Typed Racket. To know what the right answer is for the declare-exporting below, I'd have to know how typed/racket fits into the picture. In particular, is it re-exporting things from typed/scheme? Or from those helper modules you have listed? Or from some other place? It's probably easier to just consider `typed/racket/base' and `typed/scheme/base' here. Both of them export identifiers from the modules listed in the `declare-exporting' declaration. For example, `with-handlers' is defined in `typed-scheme/base-env/prims'. Here's what the documentation for `typed/racket/base' looks like: @(defmodulelang* (typed/racket/base typed/racket) #:use-sources (typed-scheme/typed-scheme typed-scheme/base-env/prims typed-scheme/base-env/extra-procs typed-scheme/base-env/base-types typed-scheme/base-env/base-types-extra)) Also, I don't think this is a problem with the general setup of documentation for Typed Racket. In particular, the identifier `define-type' is defined in the same module as `with-handlers', and it gets handled properly by Scribble, by DrRacket, and by `check-docs'. You can see this by searching for `define-type' in the documentation, or for `U', which is defined in the same module as `-'. Instead, I think the problem is that `with-handlers' and `-' are both identifiers exported from `racket', and this is causing some sort of confusion in the Scribble doc system, but I don't know exactly what, and I'm therefore confused about how to try to fix it. Of course, it might be something totally different, also -- the vagaries of Scribble linking are still opaque to me. Robby On Thu, Jun 23, 2011 at 3:16 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: Currently, the documentation completeness checker (a wonderful tool; thanks, Robby!) for Typed Racket complains that `-' and `with-handlers' are not documented when provided from `typed/scheme', `typed/scheme/base', and `typed-scheme'. However, these identifiers are fine when provided from `typed/racket', and are both defined in modules where `check-docs' finds the documentation for other things just fine, such as `define:' and `All'. The documentation looks like this: (declare-exporting typed/scheme/base typed/scheme typed-scheme #:use-sources (typed-scheme/typed-scheme typed-scheme/base-env/prims typed-scheme/base-env/extra-procs typed-scheme/base-env/base-types typed-scheme/base-env/base-types-extra)) where `-' is defined in `typed-scheme/base-env/base-types-extra' and `with-handlers' is defined in `typed-scheme/base-env/prims'. Is there something else I should be doing here? Is there a bug in `check-docs'? -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Strange problem with `check-docs' and `#:use-sources'
On Jun 23, 2011 6:17 PM, Robby Findler ro...@eecs.northwestern.edu wrote: Is the with-handlers that typed/racket exports the same identifier as the one exported by racket, or is it a different binding? 'with-handlers' in 'typed/racket' is a different binding. Basically, it just adds some annotations to help the type checker. Robby On Fri, Jun 24, 2011 at 2:46 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Wed, Jun 22, 2011 at 6:53 PM, Robby Findler ro...@eecs.northwestern.edu wrote: To really know what is going on, one has to trace thru the re-provides for each of these identifiers and match them up to the declare-exporting declarations. In the declaration below, you're essentially saying any identifiers documented in this module should appear to come from the typed/scheme/base, typed/scheme, and typed-scheme modules, but they are really actually exported from one of the modules listed in the #:use-sources keyword which means, to the documentation system that any module that re-exports an identifier from, say, typed-scheme/base-env/base-types-extra, will have its documentation attached to the docs in the file with the declare-exporting below and the docs system will then point userse to typed/scheme/base. I don't think that this is what you want, since you probably want to to point people to typed/racket. That's not what's going on here, although you couldn't tell that from my email. That `declare-exporting' is in a subsection which only documents `typed/scheme' etc, and not any of the actual forms in Typed Racket. To know what the right answer is for the declare-exporting below, I'd have to know how typed/racket fits into the picture. In particular, is it re-exporting things from typed/scheme? Or from those helper modules you have listed? Or from some other place? It's probably easier to just consider `typed/racket/base' and `typed/scheme/base' here. Both of them export identifiers from the modules listed in the `declare-exporting' declaration. For example, `with-handlers' is defined in `typed-scheme/base-env/prims'. Here's what the documentation for `typed/racket/base' looks like: @(defmodulelang* (typed/racket/base typed/racket) #:use-sources (typed-scheme/typed-scheme typed-scheme/base-env/prims typed-scheme/base-env/extra-procs typed-scheme/base-env/base-types typed-scheme/base-env/base-types-extra)) Also, I don't think this is a problem with the general setup of documentation for Typed Racket. In particular, the identifier `define-type' is defined in the same module as `with-handlers', and it gets handled properly by Scribble, by DrRacket, and by `check-docs'. You can see this by searching for `define-type' in the documentation, or for `U', which is defined in the same module as `-'. Instead, I think the problem is that `with-handlers' and `-' are both identifiers exported from `racket', and this is causing some sort of confusion in the Scribble doc system, but I don't know exactly what, and I'm therefore confused about how to try to fix it. Of course, it might be something totally different, also -- the vagaries of Scribble linking are still opaque to me. Robby On Thu, Jun 23, 2011 at 3:16 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: Currently, the documentation completeness checker (a wonderful tool; thanks, Robby!) for Typed Racket complains that `-' and `with-handlers' are not documented when provided from `typed/scheme', `typed/scheme/base', and `typed-scheme'. However, these identifiers are fine when provided from `typed/racket', and are both defined in modules where `check-docs' finds the documentation for other things just fine, such as `define:' and `All'. The documentation looks like this: (declare-exporting typed/scheme/base typed/scheme typed-scheme #:use-sources (typed-scheme/typed-scheme typed-scheme/base-env/prims typed-scheme/base-env/extra-procs typed-scheme/base-env/base-types typed-scheme/base-env/base-types-extra)) where `-' is defined in `typed-scheme/base-env/base-types-extra' and `with-handlers' is defined in `typed-scheme/base-env/prims'. Is there something else I should be doing here? Is there a bug in `check-docs'? -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Strange problem with `check-docs' and `#:use-sources'
On Jun 23, 2011 6:39 PM, Robby Findler ro...@eecs.northwestern.edu wrote: I think I'd need to actually look at the code next. I didn't seem to find it, tho; can you give me a pointer? It should be in 'collects/typed-scheme/scribblings/ts-reference.scrbl' for typed/racket and 'collects/typed-scheme/scribblings/reference/compatibility.scrbl' for typed/scheme. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Strange problem with `check-docs' and `#:use-sources'
On Fri, Jun 24, 2011 at 8:58 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Jun 23, 2011 6:39 PM, Robby Findler ro...@eecs.northwestern.edu wrote: I think I'd need to actually look at the code next. I didn't seem to find it, tho; can you give me a pointer? It should be in 'collects/typed-scheme/scribblings/ts-reference.scrbl' for typed/racket and 'collects/typed-scheme/scribblings/reference/compatibility.scrbl' for typed/scheme. I don't see any docs for with-handlers in there: [robby@gaoping] ~/git/exp/plt/collects/typed-scheme/scribblings$ find . -name \*scrbl -exec grep -H with-handlers {} \; [robby@gaoping] ~/git/exp/plt/collects/typed-scheme/scribblings$ Perhaps the confusion is this?: scribble only associates documentation with actual bindings (well, when you have re-exporting and use #:with-sources the situation is more complex, but what I'm writing in this sentence is the right way to think of it as a baseline and then other things are exceptions) so because the typed/racket with-handlers binding is a different binding, it needs different @defwhatever. And, as further rationale for that (something that has been said before, but I forget if it was said here or not), macros can tell the difference so documenting the bindings separately, even if all the docs say is behaves like X [with link], is the right thing. Or are there actually docs that I still just didn't find? Robby _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Strange problem with `check-docs' and `#:use-sources'
On Thu, Jun 23, 2011 at 9:19 PM, Robby Findler ro...@eecs.northwestern.edu wrote: On Fri, Jun 24, 2011 at 8:58 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Jun 23, 2011 6:39 PM, Robby Findler ro...@eecs.northwestern.edu wrote: I think I'd need to actually look at the code next. I didn't seem to find it, tho; can you give me a pointer? It should be in 'collects/typed-scheme/scribblings/ts-reference.scrbl' for typed/racket and 'collects/typed-scheme/scribblings/reference/compatibility.scrbl' for typed/scheme. I don't see any docs for with-handlers in there: [robby@gaoping] ~/git/exp/plt/collects/typed-scheme/scribblings$ find . -name \*scrbl -exec grep -H with-handlers {} \; [robby@gaoping] ~/git/exp/plt/collects/typed-scheme/scribblings$ Perhaps the confusion is this?: scribble only associates documentation with actual bindings (well, when you have re-exporting and use #:with-sources the situation is more complex, but what I'm writing in this sentence is the right way to think of it as a baseline and then other things are exceptions) so because the typed/racket with-handlers binding is a different binding, it needs different @defwhatever. And, as further rationale for that (something that has been said before, but I forget if it was said here or not), macros can tell the difference so documenting the bindings separately, even if all the docs say is behaves like X [with link], is the right thing. Or are there actually docs that I still just didn't find? I think your copy of the tree must be out of date; you can see the docs for `with-handlers' in git head here: https://github.com/plt/racket/blob/master/collects/typed-scheme/scribblings/reference/special-forms.scrbl#L387 -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Strange problem with `check-docs' and `#:use-sources'
On Fri, Jun 24, 2011 at 9:27 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Thu, Jun 23, 2011 at 9:19 PM, Robby Findler ro...@eecs.northwestern.edu wrote: On Fri, Jun 24, 2011 at 8:58 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Jun 23, 2011 6:39 PM, Robby Findler ro...@eecs.northwestern.edu wrote: I think I'd need to actually look at the code next. I didn't seem to find it, tho; can you give me a pointer? It should be in 'collects/typed-scheme/scribblings/ts-reference.scrbl' for typed/racket and 'collects/typed-scheme/scribblings/reference/compatibility.scrbl' for typed/scheme. I don't see any docs for with-handlers in there: [robby@gaoping] ~/git/exp/plt/collects/typed-scheme/scribblings$ find . -name \*scrbl -exec grep -H with-handlers {} \; [robby@gaoping] ~/git/exp/plt/collects/typed-scheme/scribblings$ Perhaps the confusion is this?: scribble only associates documentation with actual bindings (well, when you have re-exporting and use #:with-sources the situation is more complex, but what I'm writing in this sentence is the right way to think of it as a baseline and then other things are exceptions) so because the typed/racket with-handlers binding is a different binding, it needs different @defwhatever. And, as further rationale for that (something that has been said before, but I forget if it was said here or not), macros can tell the difference so documenting the bindings separately, even if all the docs say is behaves like X [with link], is the right thing. Or are there actually docs that I still just didn't find? I think your copy of the tree must be out of date; you can see the docs for `with-handlers' in git head here: https://github.com/plt/racket/blob/master/collects/typed-scheme/scribblings/reference/special-forms.scrbl#L387 Ah, right. Sorry. I think the problem is that with-handlers is actually called with-handlers: in the place where it exported (as far as the declare-exporting is concerned) so it is not getting connected with the identifier named with-handlers after the renaming happens. That is, way to interpret the argument to #:with-sources is I am documented exports from this module and the earlier arguments to declare-exporting (typed/scheme/base typed/scheme typed-scheme in this case) are just used in the documentation to print out what the exports are; they aren't actually used in a meaningful way internally in scribble to connect anything to anything else. So I think the fix is to do the renaming for with-handlers before it gets exported from typed-scheme/base-env/prims (or introduce another module and put that one in the #:use-sources and use it as the one where the re-providing is happening). I didn't actually try this out (I made a quick attempt, but there are several changes required to just move the renaming into prims.rkt), tho, so I may be getting this wrong Robby _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev