<div dir="ltr"><div><div><div><div>> It would be nice to have a tool that extracts the ghc relevant options<br>> from the cabal file which then could be used by ghc-mod, hdevtools or<br>> any other tool that wants to use ghc in conjunction with cabal.<br>

<br></div><div>Personally, I would like that very much, and I would be an active user.<br></div><div><br>Why not just a parameter, much like cabal own behaviour:<br><br></div><div>cabal build - sane default<br>cabal build exe:whatever - build executable whatever<br>

</div><div>babal build lib:whatever - build executable whatever<br><br></div><div>Its not really critical that the default is a cover all scenario, as long as you have those other options. Then you could just configure an editor (vim) setting to manually tell it what should it do.<br>

<br></div><div>I would prefer that, even if it meant a little more configuration work, than having a 'merge all' situation that does, typically, more harm than good.<br></div><div><br></div>> I think the "right" way might be to find the associated cabal target <br>

> for the current source file.<br><br></div>I also have doubts that this is possible.<br><br></div>Cheers,<br></div>Joćo<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-21 12:22 GMT+00:00 Daniel Trstenjak <span dir="ltr"><<a href="mailto:daniel.trstenjak@gmail.com" target="_blank">daniel.trstenjak@gmail.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Alan,<br>
<div class=""><br>
On Fri, Feb 21, 2014 at 02:09:28PM +0200, AlanKim Zimmerman wrote:<br>
> In terms of using the right section of cabal, in the dev/editor environment you<br>
> actually need to union of all the cabal targets, so all the various hs-src<br>
> directories etc are in scope.<br>
<br>
</div>You might get an issue by doing it that way, just think about two<br>
executables having modules with the same name.<br>
<br>
I think the "right" way might be to find the associated cabal target<br>
for the current source file.<br>
<br>
But I don't know if it's possible to always get a unique cabal target.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
Greetings,<br>
Daniel<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>