<div dir="ltr"><div><div>What I am doing in HaRe (as a trial at this stage) is to load the module graph for each cabal target in turn, and take the union of all non-Main modules. This will work for a large proportion of cabal files.<br>

<br>Where something special is going on in terms of e.g. flags pulling on one of two mutually exclusive files with the same name, a different approach will be needed, probably by specifying how to break the tie in a config section for the tool.<br>

<br></div>But I agree that a separate tool could be useful for this, I am pretty sure BuildWrapper is wrestling with the same problem.<br><br></div>Alan<br><div><div><br></div></div></div><div class="gmail_extra"><br><br>

<div class="gmail_quote">On Fri, Feb 21, 2014 at 2:22 PM, Daniel Trstenjak <span dir="ltr"><<a href="mailto:daniel.trstenjak@gmail.com" target="_blank">daniel.trstenjak@gmail.com</a>></span> wrote:<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>