Sorry for the wait. First I want to show the same example with the prefix (.nif24) (stmts (type HiddenType1 ... (call typeof(block . (stmts ( type A ... int ) A) ) (proc test ... (params %change, derivedTypeof% HiddenType1) ... (stmts (discard .)))) ) Run
So, when the macro is called, it looks to see what information is available. Maybe a new NodeKind nnkInfo needs to be added for this. So calling a macro that gets the ast of the test procedure, sem calls a procedure that when info is found, it changes that ast so that it matches the old one. So when designing transformations, we need to take into account that the transformation should be possible to reverse using info.