Hi Andrew,

I'm actually writing a tool to automate the workflow when coding on multiple modules, and dealing with a shared sandbox.
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.

Cheers


On 24 July 2014 00:18, Andrew Pennebaker <andrew.pennebaker@gmail.com> wrote:
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.

Fortunately, cabal can reinstall a library with profiling support, with:

cabal install --reinstall -p <library>

Unfortunately, cabal is a bit of a simpleton, so this will fail unless that libraries dependencies are also installed with profiling enabled:

cabal install --reinstall -p <libraryX> <libraryY> <libraryZ> ...

For example, a user who wants to profile his die-rolling program must run:

$ sudo apt-get install haskell-platform haskell-platform-doc haskell-platform-prof
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

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.

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.

What do you think?

--
Cheers,

Andrew Pennebaker

_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries




--
A\ois
http://twitter.com/aloiscochard
http://github.com/aloiscochard