OPTIONS_GHC -auto-all

Serge D. Mechveliani mechvel at botik.ru
Sat Dec 2 06:53:25 EST 2006

Dear GHC developers,

Can you, please tell me how to add             -prof -auto-all  
as dynamic option for a chosen source module?  

This is in  ghc-6.6.

I `make' my large program (of many modules) via Cabal, under  -prof.

The  Main  module contains the test example  main.

`main'  calls for  LemmaSearch.searchLemmataInInitial.

And I set  {-# SCC ... #-}  in several places in the module  
`Main' is also built under  -prof  and run under  +RTS -p -RTS.

Still it occurs difficult to find from  *.prof  who namely takes most 
of time.
So, I try to add                         -auto-all    
-- but only for the module  LemmaSearch,  

because the cost centers of other modules will show a great inherited 
cost and thus, make a confusion.
I am doing this by adding the line

  {-# OPTIONS_GHC -fglasgow-ext -prof -auto-all #-}

(the syntax is by  Users Guide)
before the line

  module LemmaSearch  

in the source module, and command, again,   make buld.
It reports

  runhaskell Setup.hs build
  Preprocessing library dumatel-1.6...
  Building dumatel-1.6...
      unknown flags in  {-# OPTIONS #-} pragma: -fglasgow-ext -prof -auto-all
  make: *** [build] Error 1

Everything except  -auto-all,  is already inside `make'.
But GHC rejects all variants of this my option, and with quoted 
"auto-all"  too.

Who can advice please?

Thank you in advance for help,

Serge Mechveliani
mechvel at botik.ru

More information about the Glasgow-haskell-users mailing list