1(module top-int '#%kernel
2  (#%require (for-syntax '#%kernel))
3
4  (#%provide #%top-interaction)
5
6  (define-syntaxes (#%top-interaction)
7    (lambda (stx)
8      (if (eq? 'top-level (syntax-local-context))
9          'ok
10          (raise-syntax-error
11           #f
12           "not at top level"
13           stx))
14      (if (symbol? (syntax-e stx))
15          (raise-syntax-error #f "bad syntax" stx)
16          (datum->syntax stx (cdr (syntax-e stx)) stx stx)))))
17
18