[racket-dev] Can't get for-label to work in Scribble docs

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Jan 23 17:59:10 EST 2012

#:use-sources is for the relatively rare case that (in the example below),
db and bd/base both export identifiers from some some common, but
undocumented place, like db/private/base (just making that up). It is an
annotation that tells scribble that "even though db does not re-export
db/base, please go ahead and document it like it does". Something like
that.

Note that this is only appropriate if the exports *really* *are* the same
identifier, but coming from some shared, undocumented place.

If the bindings are actually different, then they should be documented
twice (perhaps abstracted over in some way, but ultimately with two
defprocs or whatever).

(The easiest thing may be to make db re-export db/base, assuming it isn't
already.)

Robby

On Monday, January 23, 2012, Neil Toronto wrote:

> On 01/23/2012 01:36 PM, Ryan Culpepper wrote:
>
>> On 01/23/2012 01:31 PM, Neil Toronto wrote:
>>
>>> On 01/23/2012 01:18 PM, Neil Toronto wrote:
>>>
>>>> For some reason, when I require (for-label db/base), I still get
>>>> warnings about `sql-timestamp?', `sql-time?' and `sql-date?', and red
>>>> underlines under them.
>>>>
>>>
>>> Okay, I figured out what I need to do, but not why it works. I have to
>>> require JUST (for-label db), NOT (for-label db/base) NOR (for-label db
>>> db/base).
>>>
>>> That (for-label db/base) and (for-label db db/base) don't work makes no
>>> sense to me. Ryan's Scribble docs look fine. What's going on?
>>>
>>
>> I suspect I should be using #:use-sources to tell Scribble that those
>> bindings from db and db/base are the same.
>>
>
> I have a struct type exported by both `plot' and `plot/utils'. I should
> probably do the same.
>
> How would you do that, anyway? I've read and re-read the `defmodule' docs,
> but I still don't know how to use #:use-sources.
>
> Neil T
> _________________________
>  Racket Developers list:
>  http://lists.racket-lang.org/**dev <http://lists.racket-lang.org/dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20120123/793d4763/attachment.html>

Posted on the dev mailing list.