Fix construction of predicate type for `declare-refinement'.
svn: r14933
This commit is contained in:
parent
7e6c1be6b0
commit
7237ad6046
|
@ -44,11 +44,11 @@
|
||||||
;; FIXME - this sucks and should die
|
;; FIXME - this sucks and should die
|
||||||
[(define-values () (begin (quote-syntax (declare-refinement-internal pred)) (#%plain-app values)))
|
[(define-values () (begin (quote-syntax (declare-refinement-internal pred)) (#%plain-app values)))
|
||||||
(match (lookup-type/lexical #'pred)
|
(match (lookup-type/lexical #'pred)
|
||||||
[(and t (Function: (list (arr: (list dom) rng #f #f '()))))
|
[(and t (Function: (list (arr: (list dom) (Values: (list (Result: rng _ _))) #f #f '()))))
|
||||||
(register-type #'pred
|
(let ([new-t (make-pred-ty (list dom)
|
||||||
(make-pred-ty (list dom)
|
rng
|
||||||
rng
|
(make-Refinement dom #'pred (syntax-local-certifier)))])
|
||||||
(make-Refinement dom #'pred (syntax-local-certifier))))
|
(register-type #'pred new-t))
|
||||||
(list)]
|
(list)]
|
||||||
[t (tc-error "cannot declare refinement for non-predicate ~a" t)])]
|
[t (tc-error "cannot declare refinement for non-predicate ~a" t)])]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user