typed-racket icon indicating copy to clipboard operation
typed-racket copied to clipboard

Document: Fix the definition of `defmodule/incl`.

Open NoahStoryM opened this issue 2 years ago • 3 comments

In the old definition, if we search for JSExpr in the search manuals, we will get: JSExpr provided from typed/racket/base, typed/racket

instead of JSExpr provided from typed/json

NoahStoryM avatar Nov 08 '21 07:11 NoahStoryM

I don't think this is the right fix -- it's equivalent to just taking out the section.

samth avatar Nov 08 '21 15:11 samth

I'm not sure about the purpose of introducing section in defmodule/incl, but I tried deleting #:style in these two definitions to ensure that the section is valid:

@(define-syntax-rule @defmodule/incl[name rest ...]
    (list
     (section (string-append "Typed for "(symbol->string'name)))
     @defmodule[name rest ...]))

@(define-syntax-rule @defmodule/incl[name rest ...]
    (begin
      (section (string-append "Typed for "(symbol->string'name)))
      @defmodule[name rest ...]))

It seems that these two definitions both make the document generate the corresponding section. Have I missed something? I am not very familiar with scribble.

NoahStoryM avatar Nov 09 '21 02:11 NoahStoryM

By the way, can we consider adding @section{Typed for the @racketfont{typed} collection} and using

(subsection #:style '(hidden) (symbol->string 'name))

instead of

(section #:style '(hidden toc-hidden unnumbered)
         (string-append "Typed for " (symbol->string 'name)))

I think it might be better to list these typed collections in the catalog, just like we list Types in Type Reference.

NoahStoryM avatar Nov 09 '21 02:11 NoahStoryM