syndicate-2017/racket/typed/tests/phantom-rho.rkt

22 lines
670 B
Racket
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#lang typed/syndicate
(require rackunit/turnstile)
;; make sure that we can look at the type of the facet without the ρ in it
(check-type
(role-strings
(start-facet x
(define (push-results)
(cond
[(zero? 0)
(start-facet done (assert #t))]
[else
#f]))
(define ( (ρ) (perform-task [k : (proc -> ★/t #:roles (ρ))]))
(start-facet perform
(on start (stop perform (k)))))
(on start (call/inst perform-task push-results))))
: (List String)
-> (list
"(Role (x) (Reacts OnStart (Role (perform) (Reacts OnStart (Stop perform (Branch (Effs (Role (done) (Shares Bool))) (Effs)))))))"))