What you're asking for is almost exactly the same as the -auto-all profiling option. The only difference is that you want to use your own function 'namedEx' instead of _scc_. It seems like it would be a fairly easy thing to generalise the -auto-all option: ghc --auto-all="namedEx" --extra-implicit-import="HalsBacktraceModule" -- Alastair