Make top interaction handle module correctly.

Closes PR 14163.

original commit: f8eae8c00d2a370a88ef8514a90d4e0692c39627
This commit is contained in:
Eric Dobson 2013-11-17 19:15:35 -08:00
parent c019c9dc4b
commit eeb7e92fe7
2 changed files with 10 additions and 1 deletions

View File

@ -49,7 +49,8 @@
(define (ti-core stx init)
(current-type-names (init-current-type-names))
(syntax-parse stx
[(_ . ((~datum module) . rest))
#:literal-sets (kernel-literals)
[(_ . (module . rest))
#'(module . rest)]
[(_ . (~and form ((~var command (static interactive-command? #f)) . _)))
((interactive-command-procedure (attribute command.value)) #'form init)]

View File

@ -46,6 +46,14 @@
;; Add 'only at the toplevel tests'
(define (interactive-tests)
(test-suite "Interactive tests"
(test-form #rx""
(module test racket))
(test-form #rx""
(define module displayln))
(test-form #rx"racket"
(module 'racket))
(test-form #rx"1"
(:type 1))
(test-form (regexp-quote "(U Positive-Byte Zero)")