title: What is the procedure for profiling under GHC 7.10.1 and cabal 1.23?
body: <p>What is the recommended procedure for profiling under GHC 7.10.1 and cabal 1.23? The profiling-related error and warning messages from GHC and cabal-install are very inconsistent.
  </p>
  
  <ol>
  <li><p>Try to run an executable with profiling, and you are told:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ prediction-interactive +RTS -p
  
  prediction-interactive: the flag -p requires the program to be built with -prof
  </code></pre></li>
  <li><p>Put <code>-prof</code> in your cabal file, and you are told:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ cabal build
  
  Warning: 'ghc-options: -prof' is not necessary and will lead to problems when
  used on a library. Use the configure flag --enable-library-profiling and/or
  --enable-executable-profiling.
  </code></pre></li>
  <li><p>Follow that advice (and remove -prof from the cabal file), and you are told:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ cabal configure --enable-executable-profiling
  
  Resolving dependencies...
  Configuring creatur-wains-prediction-1.0...
  Warning: The flag --enable-executable-profiling is deprecated. Please use
  --enable-profiling instead.
  </code></pre></li>
  <li><p>Follow that advice, and you are told:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ cabal configure --enable-profiling
  
  Resolving dependencies...
  Configuring creatur-wains-prediction-1.0...
  
  $ cabal build
  
  . . .
  Installing executable(s) in
  /home/eamybut/nosync/sandboxes/prediction-wains/bin
  Installed creatur-wains-prediction-1.0
  
  $ prediction-interactive +RTS -p
  
  prediction-interactive: the flag -p requires the program to be built with -prof
  </code></pre></li>
  </ol>
  
  <p>Facepalm!</p>
  
  <p><strong>EDIT</strong>: Added cabal build in step 4.</p>