<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Presumably the template-haskell-2.3 package does not build with ghc-6.8<br>

but fails to correctly specify the version of base or ghc that it<br>
requires. If it did then we would have a better chance to get this<br>
right.<br>
</blockquote><div><br>Yes, this is certainly an issue in general with template-haskell-2.3. How do we fix this?<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Another possible workaround...<br>
<br>
If you avoid using the flag hack then the solver would not have to<br>
choose so early which version of template-haskell to commit to and it<br>
would be able to pick the right version later. Though then you need an<br>
alternative method of finding which version of template-haskell you<br>
ended up with. You could do it with some custom code in Setup.hs.<font color="#888888"><br></font></blockquote></div><br>I don&#39;t mind using a different approach. How do I detect which version of template-haskell I&#39;m using in Setup.lhs that is backwords compatible to Cabal 1.2? I would like to support both template-haskell-2.2 and -2.3 by deriving EMGM type representations for it, but the later has the &#39;Loc&#39; datatype. So, I&#39;m currently using the CPP flag to determine whether &#39;Loc&#39; is available or not:<br>
<br><pre style="font-family: courier new,monospace;"><pre><font size="2"><b><font color="#5f9ea0">#ifdef TH_LOC_DERIVEREP<br></font></b><i><font color="#b22222">-- This type is only provided in template-haskell-2.3 (included with GHC 6.10)<br>
</font></i><i><font color="#b22222">-- and up.<br></font></i>$(derive &#39;&#39;Loc)<br><b><font color="#5f9ea0">#endif<br></font></b></font></pre></pre>Thanks,<br>Sean<br>