<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 28, 2014 at 2:20 AM, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Hi Omari,<br>
<div class=""><br>
On Tue, May 27, 2014 at 09:55:59PM -0400, Omari Norman wrote:<br>
> The Cabal file format works very well for small projects. However, in big<br>
> projects with a library, many executables, and test suites, some irritations<br>
> emerge. You need to specify dependencies in multiple places, leading to<br>
> redundancy.<br>
<br>
</div>That's not quite true, you can share the dependencies and specify the<br>
modules once, but you have to use a different sub directory for each<br>
section (library, executable, test-suite, benchmark) in the cabal file.<br>
<br>
See: <a href="https://github.com/dan-t/hsimport/blob/master/hsimport.cabal" target="_blank">https://github.com/dan-t/hsimport/blob/master/hsimport.cabal</a></blockquote><div><br></div><div>This is a solution only where you have shared code that can be pushed into the library.  This may not be practical.  Non-trivial tests, for instance, are going to have dependencies of their own.  See</div>
<div><br></div><div><a href="http://hackage.haskell.org/package/penny-0.32.0.10/penny.cabal">http://hackage.haskell.org/package/penny-0.32.0.10/penny.cabal</a></div><div><br></div><div>where three separate components must specify dependencies on text, time, and transformers.  This was even after I moved a lot of code to the library for the sole reason of removing Cabal file redundancy.  I could have the library re-export modules from those packages but that is a kludge. </div>
<div><br></div></div></div></div>