alexclear
2018-2-4 17:13:11

@alexclear has joined the channel


dedbox
2018-2-4 19:41:14

I’m having trouble with @defthing[#:id ...]. When my id-expr does not produce a syntax object, I get this: datum->syntax: contract violation expected: (or/c syntax? #f) But when I try a syntax object instead, it has no visible effect. I found no clear examples in the docs or racket source. Help?


dedbox
2018-2-4 20:22:40

Maybe I’m solving the wrong problem. I want to deftogether a few defthings that share a ~"variable"~ var name prefix: name-thing1 and name-thing2


ben
2018-2-4 21:28:35

@dedbox that might be a bug in scribble — that @defthing[#:id #'A B ....] will use A internally but render B


dedbox
2018-2-4 21:31:14

The docs seem to suggest A and B should be the other way around.


ben
2018-2-4 21:33:48

other way around?


ben
2018-2-4 21:33:52

I don’t understand


dedbox
2018-2-4 21:34:13

>If #:id id-expr is supplied, then the result of id-expr is used in place of id.


dedbox
2018-2-4 21:34:55

I understand that to mean, if A is supplied, then A is used in place of B.


dedbox
2018-2-4 21:35:29

Where I guess “is used” refers to “appears in the output”


ben
2018-2-4 21:36:57

okay, we basically agree (I looked at the implementation of defthing, and it uses the id in 2 places — but yeah if #:id is there, it sounds like it should be used in both those places)


dedbox
2018-2-4 21:38:54

Somehow, it’s being ignored for me. I’ll work out a minimal example.


ben
2018-2-4 21:39:36

wait 1 sec


ben
2018-2-4 21:39:59

ok, here’s the example I tried https://github.com/racket/scribble/pull/161


ben
2018-2-4 21:41:21

and the #:id identifier doesn’t render, but that identifier seems to be getting used for links because when I run scribble --html foo.scrbl for the sample program, I get this warning: WARNING: no declared exporting libraries for definition in: foo


dedbox
2018-2-4 21:42:25

Cool, thanks! I see the same output here.