[#756] Add monadic `dfsInstr`
Description
In debugger we need an advanced dfs traversal of instructions. This MR changes our dfsInstr
to support that.
The point is to make dfsInstr
monadic. With such an interface, we get more flexibility in one place, e.g. our use case - enumerating instructions, is now easy to handle with State
monad. But we slightly lose flexibility in other: CtorEffectsApp
got less powerful. Anyway, we never needed it being that flexible.
Additionally I do some other minor additions that were found useful in the debugger project.
Related issue(s)
Resolves #756 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it.This is merely a refactoring. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Konstantin Ivanov