diff --git a/test/test.hl.rkt b/test/test.hl.rkt index d2e4696e..9bc2d2e5 100644 --- a/test/test.hl.rkt +++ b/test/test.hl.rkt @@ -45,9 +45,26 @@ And so does @racket[(require (submod ".." …))]: (require (submod "..")) (require (submod ".." ms2))] +Test with multiple subforms inside require, and coverage for +@racket[for-syntax]: + +@chunk[ + (require (for-syntax syntax/stx + racket/syntax) + racket/bool)] + @chunk[<*> + (begin (require (for-syntax racket/base))) (require typed/rackunit) + + + (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) ;; Gives an error because typed/racket/base is used on the #lang line: diff --git a/test/test2.hl.rkt b/test/test2.hl.rkt new file mode 100644 index 00000000..58ca8bc0 --- /dev/null +++ b/test/test2.hl.rkt @@ -0,0 +1,21 @@ +#lang hyper-literate/typed typed/racket/base + +@(require (for-label typed/racket/base + typed/rackunit)) + +@title{Title} + +Hello world. + +@chunk[<*> + (require typed/rackunit) + + ;; Would give an error as typed/racket/base is used on the #lang line: + ;curry + + (check-equal? ((make-predicate One) 1) #t) + + (define (f [x : 'e123]) x) + + (define ee (ann (f 'e123) 'e123)) + (provide ee)] diff --git a/typed/lang/common.rkt b/typed/lang/common.rkt index ad799d22..7a255a73 100644 --- a/typed/lang/common.rkt +++ b/typed/lang/common.rkt @@ -137,7 +137,6 @@ ;; to allow othe meta-languages to be chained. (define lang-sym (string->symbol (regexp-replace "^ " (syntax-e #'lang) ""))) - (dynamic-require lang-sym #f) (let ([expanded (expand `(,#'module scribble-lp-tmp-name hyper-literate/typed/private/lp (define-syntax-rule (if-preexpanding a b) a)