make Observe* more flexible
This commit is contained in:
parent
a0e8b59299
commit
e9703a4189
|
@ -14,7 +14,8 @@
|
||||||
#:do [(define arity? (get-type-arity #'TyCons))]
|
#:do [(define arity? (get-type-arity #'TyCons))]
|
||||||
#:when arity?
|
#:when arity?
|
||||||
(mk-Observe- (list (reassemble-type #'TyCons (make-list (arity-min arity?) star))))]
|
(mk-Observe- (list (reassemble-type #'TyCons (make-list (arity-min arity?) star))))]
|
||||||
[(_ (~Any/new TyCons τ ...))
|
[(_ t)
|
||||||
|
#:with (~Any/new TyCons τ ...) (type-eval #'t)
|
||||||
#:when (reassemblable? #'TyCons)
|
#:when (reassemblable? #'TyCons)
|
||||||
(mk-Observe- (list (reassemble-type #'TyCons (stx-map (lambda (_) star) #'(τ ...)))))]
|
(mk-Observe- (list (reassemble-type #'TyCons (stx-map (lambda (_) star) #'(τ ...)))))]
|
||||||
[_
|
[_
|
||||||
|
|
Loading…
Reference in New Issue