diff --git a/txexpr/base.rkt b/txexpr/base.rkt index b9c988b..22e43ef 100644 --- a/txexpr/base.rkt +++ b/txexpr/base.rkt @@ -22,8 +22,12 @@ (define+provide+safe (txexpr? x [short-only #f]) predicate/c (match x - [(list (? txexpr-tag?) (? my-xexpr?) ...) #true] - [(list (? txexpr-tag?) (? txexpr-attrs?) (? my-xexpr?) ...) #:when (not short-only) #true] + [(cons (? txexpr-tag?) rest) + (=> resume) + (match rest + [(list (? my-xexpr?) ...) #true] + [(list (? txexpr-attrs?) (? my-xexpr?) ...) #:when (not short-only) #true] + [_ (resume)])] [_ #false])) (define+provide+safe (txexpr-short? x)