<div dir="ltr"><div>Hello Dimitri,</div><div><br></div>I recommend you to use stack (<a href="https://github.com/commercialhaskell/stack">https://github.com/commercialhaskell/stack</a>) instead of cabal. Never had any problem with building since I started using it. It's awesome. It solved all my headaches caused by Cabal. But it still treats dependencies in the same way.<div><br></div><div>Rene</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 18, 2015 at 6:47 PM, Dimitri DeFigueiredo <span dir="ltr"><<a href="mailto:defigueiredo@ucdavis.edu" target="_blank">defigueiredo@ucdavis.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Karl!<br>
<br>
The way cabal is working makes sense now.<br>
<br>
I don't like it, though. Having a build fail because of changes made to another target is counter-intuitive to me. I don't understand your argument for why the current behavior is a good thing. It seems we would be extending so called "cabal hell" to within targets in a package if we were to change this? I do wish there were other options here.<br>
<br>
Anyway, thanks again for the explanation!<br>
<br>
<br>
Dimitri<br>
<br>
Em 17/07/15 19:29, Karl Voelker escreveu:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Fri, Jul 17, 2015, at 04:08 PM, Dimitri DeFigueiredo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is this a bug? Or am I missing something?<br>
</blockquote>
The dependencies are not global. You can see this by trying to import a<br>
module in Mpm.hs that is in one of the unique dependencies of "agent" -<br>
the import fails. [1]<br>
<br>
However, in order to build, you must first configure. And the<br>
"configure" step cannot be done for a single executable - it's done for<br>
the whole package. Since package dependencies are checked during the<br>
configure step, you have to have all the dependencies in place for all<br>
targets.<br>
<br>
I think this is probably a good thing, because otherwise, you could end<br>
up installing some packages that satisfy the dependencies of one target,<br>
only to find out that the particular package versions which were chosen<br>
make it impossible to satisfy the dependencies of the other target.<br>
<br>
-Karl<br>
<br></span>
1. <a href="https://gist.github.com/ktvoelker/d561889ac4bd56cadc2d" rel="noreferrer" target="_blank">https://gist.github.com/ktvoelker/d561889ac4bd56cadc2d</a><br>
_______________________________________________<br>
Beginners mailing list<span class=""><br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</span></blockquote><div class="HOEnZb"><div class="h5">
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>