[Template-haskell] Profiling with Template Haskell
Simon Peyton-Jones
simonpj@microsoft.com
Mon, 21 Jul 2003 09:22:29 +0100
| Now I know that profiling splicing doesn't make too much sense. That
| is not what I wish to do though. I wish to profile the final
| executable.
Hmm, yes good point. GHC compiles different binaries for profiled and
non-profiled execution. Splice code that runs at compile time should
presumably be non-profiled (though I'm sure someone will want to profile
it too). So TH should link non-profiled libraries at compile time, but
it's not clever enough to realise this. =20
I'll put this on my list of things to fix. I'm in the middle of a heart
transplant on GHC at the moment, aimed at making a better substrate for
TH, so I may not fix this very quickly unless it's important to you.
It will mean that you'll have to compile your own program modules both
profiled and non-profiled -- the former for run-time and the latter for
compile time -- unless you keep compile-time code and run-time code in
separate modules. That's annoying but I don't see an easy alternative.
Simon