I am using xmonad on top of an arch based system. But after upgrading i am not able to compile my xmonad.hs file via
$ xmonad --recompile
I seem to be getting error on every module of xmonad, even import XMonad doesn't seem to work. If anyone has fixed this issue somehow please let me know.
Error detected while loading xmonad configuration file:
/home/arya/.xmonad/xmonad.hs
xmonad.hs:2:1: error:
Could not find module ‘XMonad’
Use -v to see a list of the files searched for.
|
2 | import XMonad
| ^^^^^^^^^^^^^
xmonad.hs:3:1: error:
Could not find module ‘XMonad.Config.Mate’
Use -v to see a list of the files searched for.
|
3 | import XMonad.Config.Mate
| ^^^^^^^^^^^^^^^^^^^^^^^^^
xmonad.hs:5:1: error:
Could not find module ‘XMonad.StackSet’
Use -v to see a list of the files searched for.
|
5 | import qualified XMonad.StackSet as W
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
xmonad.hs:8:1: error:
Could not find module ‘XMonad.Hooks.ManageDocks’
Use -v to see a list of the files searched for.
|
8 | import XMonad.Hooks.ManageDocks
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
xmonad.hs:9:1: error:
Could not find module ‘XMonad.Hooks.EwmhDesktops’
Use -v to see a list of the files searched for.
|
9 | import XMonad.Hooks.EwmhDesktops
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
xmonad.hs:10:1: error:
Could not find module ‘XMonad.Layout.Minimize’
Use -v to see a list of the files searched for.
|
10 | import XMonad.Layout.Minimize
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Please check the file for errors.
[arya@localhost ~]$ Warning: Missing charsets in String to FontSet
conversion
[arya@localhost ~]$
monad.hs:9:1: error:
Could not find module ‘XMonad.Hooks.EwmhDesktops’
Use -v to see a list of the files searched for.
|
9 | import XMonad.Hooks.EwmhDesktops
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
xmonad.hs:10:1: error:
Could not find module ‘XMonad.Layout.Minimize’
Use -v to see a list of the files searched for.
|
10 | import XMonad.Layout.Minimize
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
$ type -a ghc
ghc is /usr/local/bin/ghc
ghc is /usr/bin/ghc
Output of $ ghc-pkg list
:
/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/package.conf.d
Cabal-2.0.1.0
array-0.5.2.0
base-4.10.1.0
binary-0.8.5.1
bytestring-0.10.8.2
containers-0.5.10.2
deepseq-1.4.3.0
directory-1.3.0.2
filepath-1.4.1.2
(ghc-8.2.2)
ghc-boot-8.2.2
ghc-boot-th-8.2.2
ghc-compact-0.1.0.0
ghc-prim-0.5.1.1
ghci-8.2.2
haskeline-0.7.4.0
hoopl-3.10.2.2
hpc-0.6.0.3
integer-gmp-1.0.1.0
pretty-1.1.3.3
process-1.6.1.0
rts-1.0
template-haskell-2.12.0.0
terminfo-0.4.1.0
time-1.8.0.2
transformers-0.5.2.0
unix-2.7.2.2
xhtml-3000.2.2
Output for pacman -Ql xmonad :
xmonad /usr/
xmonad /usr/bin/
xmonad /usr/bin/xmonad
xmonad /usr/lib/
xmonad /usr/lib/ghc-8.2.2/
xmonad /usr/lib/ghc-8.2.2/site-local/
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/Paths_xmonad.dyn_hi
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/XMonad.dyn_hi
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/XMonad/
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/XMonad/Config.dyn_hi
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/XMonad/Core.dyn_hi
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/XMonad/Layout.dyn_hi
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/XMonad/Main.dyn_hi
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/XMonad/ManageHook.dyn_hi
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/XMonad/Operations.dyn_hi
xmonad /usr/lib/ghc-8.2.2/site-local/xmonad-0.13/XMonad/StackSet.dyn_hi
xmonad /usr/lib/libHSxmonad-0.13-K842KXy8eLK2djQHd55ZyZ-ghc8.2.2.so
xmonad /usr/share/
xmonad /usr/share/doc/
xmonad /usr/share/doc/xmonad/
xmonad /usr/share/doc/xmonad/LICENSE
xmonad /usr/share/haskell/
xmonad /usr/share/haskell/register/
xmonad /usr/share/haskell/register/xmonad.sh
xmonad /usr/share/haskell/unregister/
xmonad /usr/share/haskell/unregister/xmonad.sh
xmonad /usr/share/licenses/
xmonad /usr/share/licenses/xmonad/
xmonad /usr/share/licenses/xmonad/LICENSE
xmonad /usr/share/man/
xmonad /usr/share/man/man1/
xmonad /usr/share/man/man1/xmonad.1.gz
xmonad /usr/share/pixmaps/
xmonad /usr/share/pixmaps/xmonad.svg
xmonad /usr/share/xmonad/
xmonad /usr/share/xmonad/man/
xmonad /usr/share/xmonad/man/xmonad.1
xmonad /usr/share/xmonad/man/xmonad.1.html
xmonad /usr/share/xmonad/man/xmonad.hs
xmonad /usr/share/xsessions/
xmonad /usr/share/xsessions/xmonad.desktop
SLIGHTLY RELATED,
In a fresh install of UBUNTU 20.10 I had this issue when I installed xmonad through apt with sudo apt install xmonad
. I think this also installed xmonad-contrib, which is located here libghc-xmonad-contrib-dev
, because I already had that when I tried installing it to see if it fixed. What finally fixed it in the end was cabal-installing xmonad and xmonad-contrib with cabal install xmonad
then cabal install --lib xmonad-contrib
, alongside with creating a build command in ~/.xmonad/build
.
Content of ~/.xmonad/build
:
ghc -package xmonad -package xmonad-contrib --make xmonad.hs -i -ilib -main-is main -fforce-recomp -o xmonad
Here is my command history if it is of any help:
1912 ghc-pkg list # to check the output, just as in the question
1913 cabal install xmonad
1914 xmonad --recompile
1915 cabal install xmonad-contrib
1916 cabal install --lib xmonad-contrib # the previous line gave a warning, so I issued a corrected command.
1917 xmonad --recompile
1918 ghc -package xmonad ~/.xmonad/monad.hs
1919 ghc -package xmonad ~/.xmonad/xmonad.hs # the previous line had a typo, so I had to issue the command again.
1920 xmonad --recompile
1921 nano .xmonad/build # when I tried the previous command, it said something about creating the following file, so I created it.
1922 xmonad --recompile
1923 chmod u+x .xmonad/build # when I tried the previous command, it complained about the file not being executable and recommended those permissions.
1924 xmonad --recompile # worked!!!
Probably some issue with the XMonad package on Arch linux.
As an alternative you could try pacman -s haskell-cabal
and cabal install xmonad
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.