I agree that mixing template haskell with -prof can be tricky.  It's easier if you turn off dynamic linking entirely.<br><br>As for multi-line string literals, I also think that an explicit syntax would be nice.  Until then, I usually use:<div><br></div><div>    unlines</div><div>      [ "Line 1"</div><div>      , "Line 2"</div><div>      ]</div><div><br></div><div>which ends up being pretty maintainable and easy to read.</div><br><div class="gmail_quote">On Fri Jan 23 2015 at 6:16:46 AM Evan Laforge <<a href="mailto:qdunkan@gmail.com">qdunkan@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I ran into trouble compiling template haskell with -prof, and came<br>
across the ghc manual "7.9.4. Using Template Haskell with Profiling".<br>
Unfortunately I can't use its advice directly since I put profiling<br>
and non-profiling .o files into different directories.  But in<br>
principle it seems it should work, I just have to get ghc to load TH<br>
from the debug build directory, which is built with -dynamic, while<br>
continuing to load from the profile build directory.<br>
<br>
But are there flags to get it to do that?  I'm using "-osuf .hs.o<br>
-ibuild/profile/obj".  If I put ":build/debug/obj" on the -i line, it<br>
still seems to find the profiling one.  The ghc manual advice probably<br>
gets around it by using different -osufs... I guess TH somehow ignores<br>
-osuf?  Except when I compile the debug version with osuf, if finds<br>
them fine, so I don't really know how it works.<br>
<br>
Is there a way I can directly tell TH where to look?  It seems awkward<br>
to rely on all these implicit and seemingly undocumented heuristics.<br>
<br>
And, this is somewhat beside the point, but shouldn't TH theoretically<br>
be able to load directly from .hs and compile to bytecode like ghci<br>
can do if it doesn't find the .o file?<br>
<br>
And, even more beside the point, the only reason I'm messing with TH<br>
is for a really simple (one line) multi-line string literal<br>
quasiquote.  Surely I'm not the only person who would enjoy a<br>
-XMultiLineStringLiteral extension?  The alternative seems to be a<br>
program to add or strip all of the "\n\"s, and when I want to edit,<br>
copy out, strip, edit, paste back in, add back.  At that point maybe<br>
it's easier to just get used to all the \s... but then indentation is<br>
all a bit off due to the leading \.<br>
______________________________<u></u>_________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org" target="_blank">Glasgow-haskell-users@haskell.<u></u>org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/glasgow-<u></u>haskell-users</a><br>
</blockquote></div>