[Haskell-cafe] Profiling

Daniel Fischer daniel.is.fischer at web.de
Sun Feb 21 16:11:18 EST 2010

Am Sonntag 21 Februar 2010 21:44:57 schrieb Andrew Coppin:
> Daniel Fischer wrote:
> > Am Sonntag 21 Februar 2010 18:22:07 schrieb Andrew Coppin:
> >> Oh, right. So I actually need cabal.exe to do this then?
> >
> > No, you can also
> >
> > $ ./runghc ./Setup.[l]hs configure --enable-library-profiling --user
> > -- prefix=$HOME/.cabal
> > $ ./runghc ./Setup.[l]hs build
> > $ ./runghc ./Setup.[l]hs haddock --hyperlink-source
> > $ ./runghc ./Setup.[l]hs install
> >
> > It's just more typing.
> What does the --hyperlink-source bit do?

Stephen already answered that one.

> For that matter, what do --user and --prefix do?

The flag --user allows dependencies to be satisfied from the user package 
database, --prefix says where to put stuff. Of course all these options are 
optional, you can omit them (except --enable-library-profiling, because 
that's your target) and use only the global package database.

One thing, though: if you do it manually, you have to reinstall the 
packages in the correct order (if x depends on y, you can't build x for 
profiling unless y is already built for profiling), cabal takes care of all 
that for you, so the clever method is indeed using cabal.

> > a batch file (that is the Windows analogue of a shell-script, isn't
> > it?)].
> If by "analogue" you mean "thing that's similar but with approximately
> 1/100th the expressive power", then yes. :-D
1/100th is enough for this.

More information about the Haskell-Cafe mailing list