From 735c4deac7e7c4e82ab71ea88850dd985f2d0e4b Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 11 Nov 2010 13:39:49 -0500 Subject: [PATCH] Throw a proper syntax error on uses of the ffi `->'. Closes PR 11421 --- collects/ffi/unsafe.rkt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/collects/ffi/unsafe.rkt b/collects/ffi/unsafe.rkt index 46c0351cb5..6b295ccacd 100644 --- a/collects/ffi/unsafe.rkt +++ b/collects/ffi/unsafe.rkt @@ -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