track branching for each kind of effect in match

This commit is contained in:
Sam Caldwell 2020-03-05 10:37:50 -05:00
parent 7ceed8e952
commit 6c79e5cd5c
2 changed files with 5 additions and 3 deletions

View File

@ -158,10 +158,11 @@
[ (match- e- [p- s-] ...
[_ (#%app- error- "incomplete pattern match")])
( : (U τ-s ...))
;; TODO losing branching information here
( ν-ep (eps ... ...))
( ν-ep #,(make-Branch #'((eps ...) ...)))
( ν-f #,(make-Branch #'((fs ...) ...)))
( ν-s (ss ... ...))])
( ν-s #,(make-Branch #'((ss ...) ...)))])
(define-typed-syntax (tuple e:expr ...)
[ e e- ( : τ)] ...

View File

@ -310,6 +310,7 @@
identity))
(define-typed-syntax spawn
;; TODO - do the lack of #:cut-s cause bad error messages here?
[(spawn τ-c:type s)
#:fail-unless (flat-type? #'τ-c.norm) "Communication type must be first-order"
;; TODO: check that each τ-f is a Role