Is there an easy way to refer to two different identifiers with the same
name when writing scribble documentation?

For example, let's say I have a language with a `let` binding that operates
more or less the same as racket's `let`. I wanted to write something like
this:

```
@(require (prefix-in racket: (for-label racket/base)))

@defform[(let ([id expr] ...) body ...){
The same behavior as @racket[racket:let].
}
```

This doesn't seem to work; the reference to racket's `let` ends up
including the `racket:` prefix and doesn't seem to resolve to the
appropriate link.

I looked at Typed Racket's docs to see how it manages this problem, and
found the following pattern:

```
@(module def-racket racket/base
   (require (for-label racket/base) scribble/manual)
   (define let-id (racket let))
   (provide let-id))

@(require 'def-racket)

@defform[(let ([id expr] ...) body ...){
The same behavior as @|let-id|.
}
```

source:
https://github.com/racket/typed-racket/blob/master/typed-racket-doc/typed-racket/scribblings/reference/special-forms.scrbl

So my question is, is there an easier/more direct way to accomplish this
(perhaps since these typed racket docs were written)?

It also looks like this pattern could be captured by a macro---has someone
written that already?

Thanks,
Sam Caldwell

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CALuKBHsXBQAB_Thyp9Y8PLSosXSiLWN5fUHrLBBuDF333vXfxw%40mail.gmail.com.

Reply via email to