Make Place-Channel <: (Evtof Any)

This commit is contained in:
Asumu Takikawa 2015-03-28 11:26:44 -04:00
parent c70910aaa0
commit 7b5478e0bc
3 changed files with 13 additions and 0 deletions

View File

@ -693,6 +693,10 @@
(list -Symbol -String Univ
(Un (-val #f) -Symbol)))
t)]
[((Base: 'Place _ _ _) (Evt: t))
(cg Univ t)]
[((Base: 'Base-Place-Channel _ _ _) (Evt: t))
(cg Univ t)]
[((CustodianBox: t) (Evt: t*)) (cg S t*)]
[((Channel: t) (Evt: t*)) (cg t t*)]
[((Async-Channel: t) (Evt: t*)) (cg t t*)]

View File

@ -509,6 +509,11 @@
(list -Symbol -String Univ
(Un (-val #f) -Symbol)))
t)]
;; FIXME: change Univ to Place-Message-Allowed if/when that type is defined
[((Base: 'Place _ _ _) (Evt: (== Univ)))
#t]
[((Base: 'Base-Place-Channel _ _ _) (Evt: (== Univ)))
#t]
[((CustodianBox: t) (Evt: t*))
;; Note that it's the whole box type that's being
;; compared against t* here

View File

@ -1835,6 +1835,10 @@
(tc-e (sync (make-custodian-box (current-custodian) 0))
(make-CustodianBox (-val 0)))
(tc-e (sync ((inst make-channel String))) -String)
(tc-e (sync (dynamic-place 'foo 'foo)) Univ)
(tc-e (let-values ([(in out) (place-channel)])
(sync in))
Univ)
(tc-e (sync always-evt) (-mu x (make-Evt x)))
(tc-e (sync never-evt) -Bottom)
(tc-e (sync never-evt always-evt) (-mu x (make-Evt x)))