loosen the syntactic restrictions on htdp teaching languages' require

Specifically, allow single-argument 'lib' require specs
This commit is contained in:
Robby Findler 2013-08-16 13:03:17 -05:00
parent 21ac868253
commit 736c8ca12b

View File

@ -1526,12 +1526,12 @@
stx))] stx))]
[(_ (lib . rest)) [(_ (lib . rest))
(let ([s (syntax->list #'rest)]) (let ([s (syntax->list #'rest)])
(unless ((length s) . >= . 2) (unless ((length s) . >= . 1)
(teach-syntax-error (teach-syntax-error
'require 'require
stx stx
#f #f
"expected at least two strings with lib, found only ~a parts" "expected at least one string with lib, found only ~a parts"
(length s))) (length s)))
(for-each (lambda (v) (for-each (lambda (v)
(unless (string? (syntax-e v)) (unless (string? (syntax-e v))