From b3b2b264a9b9c2545363733d22f399a01d709d0f Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Fri, 28 May 2010 17:23:10 -0400 Subject: [PATCH] Special case for (apply values ListDots) original commit: a93aecbed74672948b598a960f667d3240f86031 --- collects/typed-scheme/typecheck/tc-app.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collects/typed-scheme/typecheck/tc-app.rkt b/collects/typed-scheme/typecheck/tc-app.rkt index 84f6004b..e34275b9 100644 --- a/collects/typed-scheme/typecheck/tc-app.rkt +++ b/collects/typed-scheme/typecheck/tc-app.rkt @@ -567,10 +567,10 @@ (ret -Boolean (make-FilterSet f- f+))])] ;; (apply values l) gets special handling [(#%plain-app apply values e) - (cond [(with-handlers ([exn:fail? (lambda _ #f)]) - (untuple (tc-expr/t #'e))) - => ret] - [else (tc/apply #'values #'(e))])] + (match (single-value #'e) + [(tc-result1: (ListDots: dty dbound)) (values->tc-results (make-ValuesDots null dty dbound) #f)] + [(tc-result1: (List: ts)) (ret ts)] + [_ (tc/apply #'values #'(e))])] ;; rewrite this so that it takes advantages of all the special cases [(#%plain-app k:apply . args) (tc/app/internal (syntax/loc form (#%plain-app apply . args)) expected)] ;; handle apply specially