From 13384db457f13ff0127c5e675285d27f3a5a68d0 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 7 Jul 2008 14:58:22 -0400 Subject: [PATCH] make-Values now checks its argument for having only 1 element original commit: 2844dec0a109157a05db51e8494d3f317c96c379 --- collects/typed-scheme/private/type-effect-convenience.ss | 6 ------ collects/typed-scheme/private/type-utils.ss | 8 +------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/collects/typed-scheme/private/type-effect-convenience.ss b/collects/typed-scheme/private/type-effect-convenience.ss index cf76cb55..6f166791 100644 --- a/collects/typed-scheme/private/type-effect-convenience.ss +++ b/collects/typed-scheme/private/type-effect-convenience.ss @@ -140,12 +140,6 @@ (define -values make-Values) -;; produce the appropriate type of a list of types -;; that is - if there is exactly one type, just produce it, otherwise produce a values-ty -;; list[type] -> type -(define (list->values-ty l) - (if (= 1 (length l)) (car l) (-values l))) - (define-syntax *Un (syntax-rules () [(_ . args) (make-Union (list . args))])) diff --git a/collects/typed-scheme/private/type-utils.ss b/collects/typed-scheme/private/type-utils.ss index f17a7626..80d7a5ff 100644 --- a/collects/typed-scheme/private/type-utils.ss +++ b/collects/typed-scheme/private/type-utils.ss @@ -56,12 +56,6 @@ (make-ValuesDots (map sb types) (sb dty) dbound))]) target)) -;; the other definition is not accessible here -(define (-values args) - (if (= (length args) 1) - (car args) - (make-Values args))) - ;; substitute-dots : Listof[Type] Option[type] Name Type -> Type (define (substitute-dots images rimage name target) (define (sb t) (substitute-dots images rimage name t)) @@ -69,7 +63,7 @@ (type-case sb target [#:ValuesDots types dty dbound (if (eq? name dbound) - (-values + (make-Values (append (map sb types) ;; We need to recur first, just to expand out any dotted usages of this.