instead of allowing no #%module-begin, catch it and report a suitable error

svn: r17191
This commit is contained in:
Eli Barzilay 2009-12-05 02:21:25 +00:00
parent 9c60a27493
commit c5565d4611

View File

@ -9,12 +9,12 @@
(define-syntax (module stx)
(syntax-case stx (#%module-begin)
[(module name base (#%module-begin body ...))
(begin
#'(begin body ...))]))
#'(begin body ...)]
[(module name base body ...)
(raise-syntax-error #f "missing #%module-begin" stx)]))
(define-syntax (lp-include stx)
(syntax-case stx ()
[(_ name)
(with-syntax ([there (datum->syntax stx 'there)])
#'(include-at/relative-to here there name))]))