<div dir="ltr">What if -p continued to default to false, but when -p was specified, cabal was smart enough to automatically recompile all dependencies with -p, rather than complaining about them lacking profiling?<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 12:51 PM, Alois Cochard <span dir="ltr"><<a href="mailto:alois.cochard@gmail.com" target="_blank">alois.cochard@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Andrew,<div><br></div><div>I'm actually writing a tool to automate the workflow when coding on multiple modules, and dealing with a shared sandbox.</div>
<div>I think that would be the perfect fit for an option like this (and thanks to your email, I'll be sure it's easy to enable... or maybe even make it the default... but ... developers often want fast compilation too!), I don't really see that enabled by default on cabal for the same reason others mentioned.</div>

<div><br></div><div>Cheers</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On 24 July 2014 00:18, Andrew Pennebaker <span dir="ltr"><<a href="mailto:andrew.pennebaker@gmail.com" target="_blank">andrew.pennebaker@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">I love GHC's profiling support, and like to use it to analyze the performance of my Haskell applications. However, profiling an application is difficult when it depends on any third-party libraries, as cabal doesn't include profiling information by default.<div>


<br></div><div>Fortunately, cabal can reinstall a library with profiling support, with:</div><div><br></div><div>cabal install --reinstall -p <library></div><div><br></div><div>Unfortunately, cabal is a bit of a simpleton, so this will fail unless that libraries dependencies are also installed with profiling enabled:</div>


<div><br></div><div>cabal install --reinstall -p <libraryX> <libraryY> <libraryZ> ...</div><div><br></div><div>For example, a user who wants to profile his die-rolling program must run:</div><div><br></div>


<div>$ sudo apt-get install haskell-platform haskell-platform-doc haskell-platform-prof<br></div><div>$ <span style="color:rgb(0,0,0);white-space:pre-wrap">sudo cabal install --reinstall -p mwc-random rvar random-fu random-source mersenne-random-pure64 stateref flexible-defaults th-extras MonadPrompt math-functions erf vector-th-unbox monad-loops random-shuffle MonadRandom</span></div>


<div><br></div><div>And that long list of packages must be slowly grown one at a time, starting from random-source, based on many attempts at running cabal install --reinstall -p ..., waiting several minutes for compilation to partially complete, and scrolling back up through the logs to track down which dependencies also neglected to compile with profiling enabled.</div>


<div><br></div><div>It can take a while to get a list of this long, full dependency chain. It would be much easier if cabal simply enabled `-p` by default, so we didn't have to think about it.</div><div><br></div><div>


What do you think?<span><font color="#888888"><br clear="all"><div><br></div>-- <br><div></div>Cheers,<div><br></div><div>Andrew Pennebaker</div><div><a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a></div>


</font></span></div></div>
<br></div></div><div class="">_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></div></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><b>A\ois</b></div><div><div><a href="http://twitter.com/aloiscochard" target="_blank">http://twitter.com/aloiscochard</a></div>
<div><a href="http://github.com/aloiscochard" target="_blank">http://github.com/aloiscochard</a></div>
</div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div></div>Cheers,<div><br></div><div>Andrew Pennebaker</div><div><a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a></div>
</div>