Zulip Chat Archive

Stream: metaprogramming / tactics

Topic: Folding Syntax


Francisco Lima (Jul 11 2025 at 10:26):

I am making a custom tactic and in it it will suggest the steps it took, so it needs to both keep track of individual steps and a general route.

So for now my tactic uses a helper function that return a list o TSyntax [`tactic] (needs to be this for the addSuggestion later) but when folding said list I come upon a problem where once I append 2 nodes using `(tactic| $(acc); $(e)) it gives a TSyntax[`tactic.seq] making the very expression for the folder not work, how can I circumvent that? be it a better folding expression or another way to keep track of the tactics used.

Aaron Liu (Jul 11 2025 at 13:44):

Why not just suggest a tacticseq?

Aaron Liu (Jul 11 2025 at 13:44):

If you really need a tactic then wrapping a tacticseq in parentheses gives back a tactic

Francisco Lima (Jul 11 2025 at 14:02):

solved using raw String and constructing the suggestion by hand, but now I am having problems with Qq Matching


Last updated: Dec 20 2025 at 21:32 UTC