Allow Template Haskell to be used with -prof
In order for this to work, you need to build the program first in the
normal way (without -prof), and then again with -prof and a suitable
-osuf (eg. -osuf p_o). The compiler will pick up the object files
from the normal way for running TH expressions, when it sees -prof
together with -osuf. If you omit the -osuf, you get an error message:
TH_genEx.hs:12:2:
Dynamic linking required, but this is a non-standard build (eg. prof).
You need to build the program twice: once the normal way, and then
in the desired way using -osuf to set the object file suffix.
If you use -osuf, but haven't built the program the normal way first,
then you see:
TH_genEx.hs:12:2:
cannot find normal object file `TH_genExLib.o'
while linking an interpreted expression
Documentation to follow.
Fixes: #651