Similar to functions like stx-car from syntax/stx, this PR adds:
I can take the container functions. I would be unwise to accept the others, because I don’t know anything about syntax-parse and thus cannot maintain the code. (It would also need docs & tests.)
Why not create a separate stx-txexpr package that depends on txexpr but adds your stx module to the txexpr collection.
What if I took out just the two syntax-parse forms, and left the functions like stx-txexpr? and stx-txexpr->values? I could define the syntax-parse forms in terms of those functions.
Still would need tests & docs.
Also, I remain unclear about the overall purpose of these functions. I thought stx-txexpr-tag? would be a predicate for syntax objects that contain txexpr-tag?. But that's not so — it also returns #true for ordinary txexpr-tags.
Yes, just like stx-pair? returns true on both normal conss and syntax containing them and stx-null? returns true on both normal '() and syntax containing it.
OK, if it corresponds to an existing idiom, that’s fine.
All the functions in syntax/stx work just as well on normal non-syntax versions as they do on full syntax versions. And one of the reasons you would use stx->list instead of syntax->list is for situations like (cons 1 (cons 3 #'(3 4))), where it's both a "normal" cons and could-be-flattened-into-a-normal-list, but part of the list inside still needs to be converted.
I will delete the syntax-parse forms and add tests and docs.