From d87339d4145ebadc70df54c5a18b6370c2b58fbc Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 7 Aug 2012 15:38:00 -0400 Subject: [PATCH] :query-result-type -> :query-type/result Result type is given, not asked for. --- collects/typed-racket/base-env/prims.rkt | 4 ++-- collects/typed-racket/core.rkt | 4 ++-- .../typed-racket/scribblings/reference/exploring-types.scrbl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/collects/typed-racket/base-env/prims.rkt b/collects/typed-racket/base-env/prims.rkt index 9024157dfb..cd2064d907 100644 --- a/collects/typed-racket/base-env/prims.rkt +++ b/collects/typed-racket/base-env/prims.rkt @@ -200,8 +200,8 @@ This file defines two sorts of primitives. All of them are provided into any mod (error ":type is only valid at the top-level of an interaction")) (define-syntax (:print-type stx) (error ":print-type is only valid at the top-level of an interaction")) -(define-syntax (:query-result-type stx) - (error ":query-result-type is only valid at the top-level of an interaction")) +(define-syntax (:query-type/result stx) + (error ":query-type/result is only valid at the top-level of an interaction")) (define-syntax (require/opaque-type stx) (define-syntax-class name-exists-kw diff --git a/collects/typed-racket/core.rkt b/collects/typed-racket/core.rkt index 985ec2d824..d7186da1d8 100644 --- a/collects/typed-racket/core.rkt +++ b/collects/typed-racket/core.rkt @@ -10,7 +10,7 @@ (typecheck provide-handling tc-toplevel tc-app-helper) (rep type-rep) (env env-req) - (for-template (only-in (base-env prims) :type :print-type :query-result-type)) + (for-template (only-in (base-env prims) :type :print-type :query-type/result)) (utils utils tc-utils arm) "tc-setup.rkt" "utils/debug.rkt") @@ -62,7 +62,7 @@ [(tc-result1: t f o) t] [(tc-results: t) (cons 'Values t)])))))] ;; given a function and a desired return type, fill in the blanks - [(_ . ((~literal :query-result-type) op:expr desired-type:expr)) + [(_ . ((~literal :query-type/result) op:expr desired-type:expr)) (let ([expected (parse-type #'desired-type)]) (tc-setup #'stx #'op 'top-level expanded init tc-toplevel-form before type (match type diff --git a/collects/typed-racket/scribblings/reference/exploring-types.scrbl b/collects/typed-racket/scribblings/reference/exploring-types.scrbl index e3b598f262..5cf6f70949 100644 --- a/collects/typed-racket/scribblings/reference/exploring-types.scrbl +++ b/collects/typed-racket/scribblings/reference/exploring-types.scrbl @@ -14,6 +14,6 @@ The following bindings are only available at the Typed Racket REPL. @defform[(:print-type e)]{Prints the type of @racket[_e]. This prints the whole type, which can sometimes be quite large.} -@defform[(:query-result-type f t)]{Given a function @racket[f] and a desired +@defform[(:query-type/result f t)]{Given a function @racket[f] and a desired return type @racket[t], shows the arguments types @racket[f] should be given to return a value of type @racket[t].}