@tmbb makes sense, best of luck!
For anyone else following along, I’ve slightly updated the previously posted code (notably to obtain the last line number of a function definition along with the first so we can copy a entire function’s definition(s) block out of a code file), which means that combined with the inject_before_final_end function from CodeGen (thanks @tmbb
how are you planning the library?) we can inject/dump a function from a template module into our code.
[edit] full code here: module_extend.ex · GitHub


















