From 044bd551b03f137ae3bc12b315070d57a45188dc Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 7 Jul 2008 14:39:10 -0400 Subject: [PATCH] stevie is magic --- collects/typed-scheme/private/infer-unit.ss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/collects/typed-scheme/private/infer-unit.ss b/collects/typed-scheme/private/infer-unit.ss index e4d9c2b2b0..450cd7312b 100644 --- a/collects/typed-scheme/private/infer-unit.ss +++ b/collects/typed-scheme/private/infer-unit.ss @@ -463,13 +463,14 @@ ;; like infer, but dotted-var is the bound on the ... ;; and T-dotted is the repeated type (define (infer/dots X dotted-var S T T-dotted R must-vars [expected #f]) - (with-handlers ([exn:infer? (lambda _ #f)]) - (let* ([short-S (take S (length T))] + (with-handlers ([exn:infer? (lambda _ #f)]) + (let* ([short-S (debug (take S (length T)))] [rest-S (drop S (length T))] [cs-short (cgen/list null (cons dotted-var X) short-S T)] [new-vars (for/list ([i (in-range (length rest-S))]) (gensym dotted-var))] [new-Ts (for/list ([v new-vars]) - (substitute (make-F v) dotted-var T-dotted))] + (substitute (make-F v) dotted-var + (substitute-dots (map make-F new-vars) #f dotted-var T-dotted)))] [cs-dotted (cgen/list null (append new-vars X) rest-S new-Ts)] [cs-dotted* (move-vars-to-dmap cs-dotted dotted-var new-vars)] [cs (cset-meet cs-short cs-dotted*)]) @@ -483,4 +484,4 @@ (define (i s t r) (infer/simple (list s) (list t) r)) -;(trace cgen/arr cgen) \ No newline at end of file +(trace cgen/arr cgen cgen/list) \ No newline at end of file