Add support for contracts on non-returning functions with filters.

original commit: b67c3272dc34147a907623c9723187952e333ff5
This commit is contained in:
Eric Dobson 2014-03-25 09:41:57 -07:00
parent 0e02a31e85
commit 8005c6be2f
2 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@
racket/dict
unstable/list
unstable/sequence
(types abbrev)
(static-contracts instantiate optimize structures combinators)
;; TODO make this from contract-req
(prefix-in c: racket/contract)
@ -514,6 +515,9 @@
;; functions with no filters or objects
[(arr: dom (Values: (list (Result: rngs (FilterSet: (Top:) (Top:)) (Empty:)) ...)) rst drst kws)
(convert-arr a)]
;; Functions that don't return
[(arr: dom (Values: (list (Result: (== -Bottom) _ _) ...)) rst drst kws)
(convert-arr a)]
;; functions with filters or objects
[(arr: dom (Values: (list (Result: rngs _ _) ...)) rst drst kws)
(if (from-untyped? typed-side)

View File

@ -80,6 +80,7 @@
(t (-polydots (a) (->... (list) (a a) -Symbol)))
(t (-mu x (-Syntax x)))
(t (-> (-> Univ -Bottom : -bot-filter) -Bottom : -bot-filter))
(t/fail ((-poly (a) (-vec a)) . -> . -Symbol)