Skip to content

Template Haskell doesn't work with profiling

We've known about this for a long time, but I can't find a ticket for it, so I'm opening one.

TH needs to load object code for the program in order to evaluate splices during compilation. However, the interpreter doesn't work with profiled object code, so the result is that you can't compile a template-haskell program for profiling, which is pretty annoying.

Is it possible to compile the program twice, once without profiling, and again with profiling, and use appropriate flags to tell GHC which .o files to load when evaluating the TH splices? I don't think so right now, but it's possible I'm wrong. If not, we should be able to devise a suitable flag that would let you do this.

Trac metadata
Trac field Value
Version 6.4.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information