From 511d641b450b788760ca9207b586fe0792a4744e Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Thu, 5 Mar 2009 00:33:48 +0000 Subject: [PATCH] All subtype tests now pass. svn: r13963 --- collects/typed-scheme/infer/infer-dummy.ss | 3 ++- collects/typed-scheme/infer/infer-unit.ss | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/typed-scheme/infer/infer-dummy.ss b/collects/typed-scheme/infer/infer-dummy.ss index e87f744f21..1088e741bc 100644 --- a/collects/typed-scheme/infer/infer-dummy.ss +++ b/collects/typed-scheme/infer/infer-dummy.ss @@ -1,8 +1,9 @@ #lang scheme/base (require "../utils/utils.ss") -(require (rep type-rep) (utils tc-utils)) +(require (rep type-rep) (utils tc-utils) mzlib/trace) (define infer-param (make-parameter (lambda e (int-err "infer not initialized")))) (define (unify X S T) ((infer-param) X S T (make-Univ) null)) +;(trace unify) (provide unify infer-param) diff --git a/collects/typed-scheme/infer/infer-unit.ss b/collects/typed-scheme/infer/infer-unit.ss index 1a1d55cca7..ea3648b095 100644 --- a/collects/typed-scheme/infer/infer-unit.ss +++ b/collects/typed-scheme/infer/infer-unit.ss @@ -386,6 +386,10 @@ ([t-arr t-arr] [s-arr s-arr]) (with-handlers ([exn:infer? (lambda (_) #f)]) (cgen/arr V X t-arr s-arr)))))] + ;; this is overly conservative + [((Result: s f o) + (Result: t f o)) + (cg s t)] [(_ _) (cond [(subtype S T) empty] ;; or, nothing worked, and we fail