title: Xmonad can't find module XMonad (or any other)
body: <p>Whenever xmonad starts, restarts, or is recompiled, I get an xmessage:</p>
  
  <pre><code>xmonad.hs:1:8:
  Could not find module `XMonad'
   Perhaps you meant
      Monad (needs flag -package haskell98-2.0.0.2)
      CgMonad (needs flag -package ghc-7.6.3)
      DsMonad (needs flag -package ghc-7.6.3)
   Use -v to see a list of the files searched for
  </code></pre>
  
  <p>This doesn't stop it from starting, but I only see updates to xmonad or xmobar settings on system reboot. My current xmonad.hs is just</p>
  
  <pre><code>import XMonad
  
  main = xmonad defaultConfig
  </code></pre>
  
  <p>and it still produces the error. Any attempts to import other modules give similar results. I have both <code>xmonad</code> and <code>xmonad-contrib</code> installed from the Arch repositories, so the modules should be properly in the ghc search path, right? I've tried reinstalling the packages from Cabal like some other sources have suggested, but it turned into a complete snafu, so I went back to the Arch repos, which ought to work. Kind of at a loss for where to go from here; any help would be greatly appreciated.</p>
  
  <p>EDIT: <code>ghc-pkg list xmonad</code> returns</p>
  
  <pre><code>/usr/lib/ghc-7.6.3/packag.conf.d
      xmonad-0.11
  /home/decalis/.ghc/x86_64-linux-7.6.3/package.conf.d
  </code></pre>
  
  <p>and <code>ghc-pkg check</code> output is here: <a href="http://pastebin.com/BsCPMn8M" rel="noreferrer">http://pastebin.com/BsCPMn8M</a>. The issue is a little clearer after seeing that, but I still don't get why it's looking in <code>~/.cabal</code> when all of the packages and their dependencies were resolved from the Arch repos by pacman.</p>