From d462a25bd19d5a8b80f69d918c488e0dee106222 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 16 Apr 2005 18:59:42 +0000 Subject: [PATCH] . original commit: 1e66762202bc42766ae64dac137ace0c89d878db --- collects/mzlib/foreign.ss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/collects/mzlib/foreign.ss b/collects/mzlib/foreign.ss index dcb7dcb..db523ac 100644 --- a/collects/mzlib/foreign.ss +++ b/collects/mzlib/foreign.ss @@ -464,6 +464,11 @@ ;; `-> expr' specify different output, can use previous names ;; 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")])) + (provide _fun) (define-syntax (_fun stx) (define (err msg . sub) (apply raise-syntax-error '_fun msg stx sub))