|
|
|
@ -151,11 +151,11 @@
|
|
|
|
|
(define+provide+safe (txexpr tag [attrs null] [elements null])
|
|
|
|
|
((symbol?) (txexpr-attrs? txexpr-elements?) . ->* . txexpr?)
|
|
|
|
|
(unless (txexpr-tag? tag)
|
|
|
|
|
(error 'txexpr (format "This is not a txexpr-tag: ~v" tag)))
|
|
|
|
|
(raise-argument-error 'txexpr "txexpr-tag?" tag))
|
|
|
|
|
(unless (txexpr-attrs? attrs)
|
|
|
|
|
(error 'txexpr (format "This is not a list of txexpr-attrs: ~v" attrs)))
|
|
|
|
|
(raise-argument-error 'txexpr "txexpr-attrs?" attrs))
|
|
|
|
|
(unless (txexpr-elements? elements)
|
|
|
|
|
(error 'txexpr (format "This is not a list of txexpr-elements: ~v" elements)))
|
|
|
|
|
(raise-argument-error 'txexpr "txexpr-elements?" elements))
|
|
|
|
|
|
|
|
|
|
(define result (cons tag (append (if (empty? attrs) empty (list attrs)) elements)))
|
|
|
|
|
(unless (txexpr? result)
|
|
|
|
|