Opened 12 years ago

Closed 11 years ago

Last modified 9 years ago

#651 closed bug (fixed)

Template Haskell doesn't work with profiling

Reported by: simonmar Owned by:
Priority: high Milestone:
Component: Template Haskell Version: 6.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

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.

Change History (6)

comment:1 Changed 12 years ago by simonmar

Component: CompilerTemplate Haskell

comment:2 Changed 12 years ago by simonmar

severity: normalmajor

comment:3 Changed 12 years ago by simonmar

Priority: normalhigh

comment:4 Changed 11 years ago by simonmar

Resolution: fixed
Status: newclosed

Fixed in HEAD.

comment:5 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:6 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple
Note: See TracTickets for help on using tickets.