[Haskell] ghc as a library and profiling
Simon Marlow
simonmarhaskell at gmail.com
Thu Aug 30 03:49:41 EDT 2007
Sönke Hahn wrote:
> I am working on a program that uses ghc as a library to typecheck code. I want
> to profile the program (compiling with '-prof -auto-all' and running
> with '+RTS -p'). Trying to compile, results in the following message:
>
> Could not find module `GHC':
> Perhaps you haven't installed the profiling libraries for package
> ghc-6.6.1?
Yes, by default we don't build or supply the GHC package with profiling,
because of the extra bloat it would add to the downloads and the time taken
to build it.
With the latest GHC sources from darcs you can add 'GhcCompilerWays=p' to
your mk/build.mk and get the GHC package built for profiling too.
> A second idea that comes to my mind is this:
> The ghc package is hidden in the standard installation, so i unhided (unhid?)
> it via 'ghc-pkg expose ghc'. Maybe it just exposed the non-profiling version
> and kept the profiling version hidden? How would i expose both?
You probably don't really want to expose the GHC package, because it
doesn't use hierarchical modules and so pollutes the top-level module
namespace.
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list