make Observe* more flexible

This commit is contained in:
Sam Caldwell 2023-02-02 14:22:25 -05:00
parent a0e8b59299
commit e9703a4189
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,8 @@
#:do [(define arity? (get-type-arity #'TyCons))]
#:when arity?
(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)
(mk-Observe- (list (reassemble-type #'TyCons (stx-map (lambda (_) star) #'(τ ...)))))]
[_