title: Cabal not installing dependencies when needing profiling libraries?
body: <p>I want to compile my program with profiling, so I run:</p>
  
  <pre><code>$ cabal configure --enable-executable-profiling
  ...
  $ cabal build
  ...
      Could not find module 'Graphics.UI.GLUT':
        Perhaps you havent installed the profiling libraries for package 'GLUT-2.2.2.0'?
  ...
  $ # indeed I have not installed the prof libs for GLUT, so..
  $ cabal install -p GLUT --reinstall
  ...
      Could not find module 'Graphics.Rendering.OpenGL':
        Perhaps you havent installed the profiling libraries for package 'OpenGL-2.4.0.1'?
  ...
  </code></pre>
  
  <p>So, the problem is, that unlike cabal's usual welcome behavior, cabal doesn't resolve the dependencies and install them when needing profiling libraries.</p>
  
  <p>I can work around it by resolving the dependencies manually (by following errors that appear after a while of compiling):</p>
  
  <pre><code>$ cabal install -p OpenGLRaw --reinstall
  $ cabal install -p StateVar --reinstall
  $ cabal install -p Tensor --reinstall
  $ cabal install -p ObjectName --reinstall
  $ cabal install -p GLURaw --reinstall
  $ cabal install -p OpenGL --reinstall
  $ cabal install -p GLUT --reinstall
  </code></pre>
  
  <p>And then repeat for my next dependency..</p>
  
  <p>Is there a better way to do this? i.e do make cabal do the work on its own as it does for normal libraries?</p>