
I have a large package and want to profile all functions of a single module of that package. I tried to prepend the pragma {-# OPTIONS_GHC -prof -auto-all #-} to the mentioned module, but GHC rejects this, because the profiler options are not allowed in the OPTIONS pragma. According to http://www.haskell.org/pipermail/glasgow-haskell-users/2006-December/011701.... this is a known issue. I could certainly add GHC-Options: -prof -auto-all to the package Cabal description, but I expect this would add cost centres to all functions in all modules of the package. I could add SCC pragmas to all top-level functions in the profiled module, but this is cumbersome. Thus my question: Is there a straightforward way to add cost centres to all functions of a single module in a Cabal package?