Zulip Chat Archive
Stream: metaprogramming / tactics
Topic: Best way to monkeypatch existing tactics?
Lawrence Wu (llllvvuu) (Jun 27 2025 at 16:18):
Suppose there's some tactic from the library (say, wlog), that I want to add some behavior to (but still run the original implementation), e.g. maybe I want to do something like (pseudocode)
redefine wlog foo generalizing bar :=
dbg_trace "hello"
wlog foo generalizing bar
dbg_trace "goodbye"
Is there a generally recommended way to make these kind of monkeypatches?
Kyle Miller (Jun 27 2025 at 19:27):
No, I believe there's no mechanism for this. I'm sure there are some creative hacks to simulate it, but there's no general system to call the previous implementation of a tactic.
Last updated: Dec 20 2025 at 21:32 UTC