OPTIONS_GHC -prof -auto-all
batterseapower at hotmail.com
Mon Mar 28 10:29:24 CEST 2011
On 26 March 2011 21:02, Henning Thielemann <ghc at henning-thielemann.de> wrote:
> to the mentioned module, but GHC rejects this, because the profiler options
> are not allowed in the OPTIONS pragma. According to
According to http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/flag-reference.html
-prof is static but -auto-all is dynamic. Thus I would expect that you
could put -prof in Cabal's Ghc-Options field and -auto-all in the
module OPTIONS pragma, which should give you the effect you desire.
I'm not sure if it's considered good style to use the -prof flag
explicitly, as there is a Cabal configure flag that will have the same
effect but is potentially portable to other compilers. However, I'm
not sure if GHC will error out if it sees -auto-all in pragma without
being supplied -prof as well. so you should probably experiment.
More information about the Glasgow-haskell-users