Make resolve actually do all the necessary resolutions.
original commit: 84d3051feeaca7451c8bfc7f8e0f7abad7475830
This commit is contained in:
parent
0e3f79d89e
commit
8b324b1fb5
|
@ -0,0 +1,6 @@
|
|||
#lang typed/racket/base
|
||||
|
||||
(struct: (v) a ((x : v)) #:mutable)
|
||||
|
||||
(: z (Struct (Rec b (a (U #f b)))))
|
||||
(define z (a #f))
|
|
@ -86,7 +86,14 @@
|
|||
(hash-set! resolver-cache seq r*))
|
||||
r*)))
|
||||
|
||||
|
||||
;; Repeatedly unfolds Mu, App, and Name constructors until the top type
|
||||
;; constructor is not one of them.
|
||||
;; Type/c? -> Type/c?
|
||||
(define (resolve t)
|
||||
(if (needs-resolving? t) (resolve-once t) t))
|
||||
(let loop ((t t))
|
||||
(if (needs-resolving? t)
|
||||
(loop (resolve-once t))
|
||||
t)))
|
||||
|
||||
;(trace resolve-app)
|
||||
|
|
Loading…
Reference in New Issue
Block a user