Xmonad can't find module XMonad

0

Whenever xmonad starts, restarts, or is recompiled, I get an xmessage:

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

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

import XMonad

main = xmonad defaultConfig

and it still produces the error. Any attempts to import other modules give similar results. I have both xmonad and xmonad-contrib 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.

Decalis

Posted 2014-03-13T01:32:47.160

Reputation: 1

Answers

0

Had the same problem all of a sudden (probably after a system update, but I can't be sure). You might have found some answers suggesting to remove .ghc and/or .cabal. That didn't work for me.

I tried the following:

sudo pacman -S ghc
caban-install xmonad-contrib

and it worked again.

Christophe Capon

Posted 2014-03-13T01:32:47.160

Reputation: 11