A not-well-thought-out brain dump on possible ways to fix:
-
Do some kind of analysis to guess which compile time functions and macros can't escape the current module, and mark them as ignored.
-
Try to re-expand the source module, but with it pulling macros from the already expanded module. This would probably involved swapping out the language for one in which cover can control expansion to replace references to macros. This probably won't work at all for macro-defining-macros. This might also much with compile time state.
-
Do the same language-swapping trick to catch macros and compile time functions as they expand and annotate them live. There are probably a ton of issues with this (like getting the correct requires inserted at the correct time, and not leaking scopes).
-
The idea case: get some kind of hook into the expander to implement 3 in a better way. (i.e. when the expander attempts to compile/interpret a macro or compile time function, have it use current-compile or call cover's annotator or something).