Throw a proper syntax error on uses of the ffi `->'.

Closes PR 11421
This commit is contained in:
Eli Barzilay 2010-11-11 13:39:49 -05:00
parent 32de59e0c1
commit 735c4deac7

View File

@ -472,9 +472,8 @@
;; Also, see below for custom function types.
(provide ->) ; to signal better errors when trying to use this with contracts
(define-syntax ->
(syntax-id-rules ()
[_ (raise-syntax-error '-> "should be used only in a _fun context")]))
(define-syntax (-> stx)
(raise-syntax-error '-> "should be used only in a _fun context" stx))
(provide _fun)
(define-for-syntax _fun-keywords