
If module A imports B, and if B was compiled without the profiling options (but A was), is the final program expected to abort (illegal operation or something like that)? If it is, why?
You must compile (and link) the whole program with -prof, because that option changes certain fundamental properties of the virtual machine. If you link modules compiled in different ways, the behaviour is unspecified ;-)
Then I ask: if I have a compiled version of a Haskell binding/API/(something like that), without the profiling options, will I have to hack the source code of this binding/API/(something like that) and compile it again to enable profiling, even though I want to profile a part of a program that doesn't make any call to the binding/API/(something like that) functions?
Yes. In order to compile your program with profiling, you also need versions of all the libraries compiled for profiling (which is why you get two versions of all the packages shipped with GHC). Cheers, Simon
participants (1)
-
Simon Marlow