fix #%app check for error message on use of primitives

svn: r7831
This commit is contained in:
Matthew Flatt 2007-11-25 15:00:40 +00:00
parent aa266525dc
commit cebdb136fe

View File

@ -33,11 +33,11 @@
(syntax-case stx ()
[(_ . body)
;; HACK: we disable all checks if #%app is not beginner-app
(not (module-identifier=? #'beginner-app (datum->syntax-object stx '#%plain-app)))
(not (module-identifier=? #'beginner-app (datum->syntax-object stx '#%app)))
(syntax/loc stx (tagged-impl . body))]
[_
;; HACK: see above
(not (module-identifier=? #'beginner-app (datum->syntax-object stx '#%plain-app)))
(not (module-identifier=? #'beginner-app (datum->syntax-object stx '#%app)))
(syntax/loc stx tagged-impl)]
[(id . args)
(syntax/loc stx (#%plain-app tagged-impl . args))]
@ -99,11 +99,11 @@
(syntax-case s ()
[(_ . body)
;; HACK: see above
(not (module-identifier=? #'beginner-app (datum->syntax-object s '#%plain-app)))
(not (module-identifier=? #'beginner-app (datum->syntax-object s '#%app)))
(syntax/loc s (tagged-impl . body))]
[_
;; HACK: see above
(not (module-identifier=? #'beginner-app (datum->syntax-object s '#%plain-app)))
(not (module-identifier=? #'beginner-app (datum->syntax-object s '#%app)))
(syntax/loc s tagged-impl)]
[(_ new-arg ...)
(begin