Title
1 if-preexpanding
2 Submodules
«submod»1
«submod»2
«submod*»
«req-dotdot»
«req-multi»
3 Avoiding for-label
«require-not-label»
«with-unsyntax»
4 Main chunk
«*»
8.13.0.7

Title🔗ℹ

1 if-preexpanding🔗ℹ

Hello world.

e123

2 Submodules🔗ℹ

Submodules work:

(module ms typed/racket/base
  (define x 1)
  (provide x))
 
(module ms2 typed/racket/base
  (define y -1)
  (provide y))

And can be required:

(require 'ms)
(require (submod "." ms2))

Submodules with module* work too:

(module* ms* racket/base
  (require typed/rackunit)
  «req-dotdot»
  (check-equal? ee 'e123)
  (check-equal? y -1))

And so does (require (submod ".." )):

(require (submod ".."))
(require (submod ".." ms2))

Test with multiple subforms inside require, and coverage for for-syntax:

(require (for-syntax syntax/stx
                     racket/syntax)
         racket/bool)

3 Avoiding for-label🔗ℹ

Wrap the (require (for-syntax racket/base)) in a (begin ) so that it gets ignored, otherwise scribble complains some identifiers are loaded twice for-label, since some identifiers have already been introduced at meta-level 0 by typed/racket.

(begin (require (for-syntax racket/base))
       (require typed/rackunit))

(let* ([b 1234]
       [e (syntax-e #`#,b)])
  (check-equal? e 1234))

4 Main chunk🔗ℹ

«*» ::=
«require-not-label»
«submod»
«req-multi»
«submod*»
(check-true (false? #f));; Should be hyperlinked to the main docs
(begin-for-syntax
  (define/with-syntax ;; Should be hyperlinked to the main docs
    x
    (stx-car ;; Should be hyperlinked to the main docs
     #'(a . b))))
(check-equal? (+ x x) 2)
(check-equal? (+ x y) 0)
«with-unsyntax»
;; Gives an error because typed/racket/base is used on the #lang line:
;curry
(check-equal? ((make-predicate One) 1) #t)
(check-equal? (ann 'sym Symbol) 'sym)
(define (f [x : 'e123]) x)
(define ee (ann (f 'e123) 'e123))
(provide ee)