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

svn: r17191

original commit: c5565d46113f82d725a75522da43259137775098
This commit is contained in:
Eli Barzilay 2009-12-05 02:21:25 +00:00
commit 29aed8817e

View File

@ -7,14 +7,14 @@
(provide lp-include)
(define-syntax (module stx)
(syntax-case stx ()
(syntax-case stx (#%module-begin)
[(module name base (#%module-begin body ...))
#'(begin body ...)]
[(module name base body ...)
(begin
#'(begin 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))]))