title: How can I debug if resetting a cabal sandbox does not solve dependency errors?
body: <p>I have a curious situation. I have a package that used to work properly and for no apparent reason stopped running <code>cabal test</code>.</p>
  
  <pre><code>$ cabal test
  The sandbox was created after the package was already configured.
  Re-configuring with most recently used options. If this fails, please run
  configure manually.
  Resolving dependencies...
  Configuring dump-0.2.6...
  cabal: The following package dependencies were requested
  --dependency='interpolatedstring-perl6=interpolatedstring-perl6-0.9.0-806887e26af0b5e9d9f99d13a2b9d08c'
  --dependency='hspec=hspec-2.1.8-4133af4aaac7344a4e3a6a8a90be2cb8'
  --dependency='haskell-src-meta=haskell-src-meta-0.6.0.10-044625c00cdf446dac843874b8e39126'
  however the given installed package instance does not exist.
  </code></pre>
  
  <p>I tried to reinstall the sandbox by running</p>
  
  <pre><code>cabal sandbox delete
  cabal sandbox init
  cabal install
  </code></pre>
  
  <p>Which helps not.</p>
  
  <p>Then I noticed the text saying <code>The sandbox was created after the package was already configured.</code> So I try to run</p>
  
  <pre><code>cabal configure
  </code></pre>
  
  <p>After which I get</p>
  
  <pre><code>$ cabal test     
  Re-configuring with test suites enabled. If this fails, please run configure
  manually.
  Resolving dependencies...
  Configuring dump-0.2.6...
  cabal: At least the following dependencies are missing:
  hspec -any
  </code></pre>
  
  <p>What might be going wrong? What can I do as the next step to try to debug this?</p>
  
  <h3>Versions</h3>
  
  <pre><code>$ echo {cabal,ghc}" --version;" | sh
  cabal-install version 1.22.2.0
  using version 1.22.2.0 of the Cabal library 
  The Glorious Glasgow Haskell Compilation System, version 7.10.1
  </code></pre>