[Haskell-cafe] Profiling a project with cabal and cabal-dev

Mike Craig mkscrg at gmail.com
Tue Nov 6 19:48:30 CET 2012

Hi all,

So I've been working on a project and I'd like to run it with profiling to
diagnose the performance hotspots. It's a cabal project and I've been using
cabal-dev for sandboxing. Normally I would just run `cabal-dev install` to
get everything built and the executables "installed" in ./cabal-dev/bin.
Since I want to compile with profiling, I tried this:

$ cabal-dev install enable-executable-profiling

The build fails with an error log that includes something like "Perhaps you
haven't installed the profiling libraries for package
`http-types-'?" If I then try ...

$ cabal-dev install -p --reinstall --force-reinstalls http-types-

... I find myself walking down the dependency tree. (http-types ->
case-insensitive -> hashable -> etc.) Presumably this would eventually walk
me out of the sandbox and I would be reinstalling the base libraries in my
sandbox with profiling enabled.

This doesn't seem right. (And if it is right, it doesn't seem like I should
have to do it manually, package by package.) What am I doing wrong?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121106/c50253c1/attachment.htm>

More information about the Haskell-Cafe mailing list