<div dir="auto">The error message is, weirdly, giving a suggestion only valid in ghci. What you actually need to do is `cabal install --lib X11`, and similarly for any other packages it reports.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 20, 2022, 11:23 Alain Bertrand <<a href="mailto:alainbe@free.fr">alainbe@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Tried with Cabal.<br>
<br>
alain@keitai-kun:~/.config/xmonad$ ~/.cabal/bin/xmonad --recompile<br>
XMonad will use ghc to recompile, because neither <br>
"/home/alain/.config/xmonad/build" nor <br>
"/home/alain/.config/xmonad/stack.yaml<br>
" exists.<br>
XMonad recompiling (forced).<br>
Errors detected while compiling xmonad config: <br>
/home/alain/.config/xmonad/xmonad.hs<br>
$ ghc --make xmonad.hs -i -ilib -fforce-recomp -main-is main -v0 <br>
-outputdir /home/alain/.cache/xmonad/build-x86_64-linux -o /ho<br>
me/alain/.cache/xmonad/xmonad-x86_64-linux<br>
<br>
xmonad.hs:5:2: error:<br>
    Could not load module ‘Graphics.X11.Xlib’<br>
    It is a member of the hidden package ‘X11-1.10.2’.<br>
    You can run ‘:set -package X11’ to expose it.<br>
    (Note: this unloads all the modules in the current scope.)<br>
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.<br>
  |<br>
5 |  import Graphics.X11.Xlib<br>
  |  ^^^^^^^^^^^^^^^^^^^^^^^^<br>
<br>
Please check the file for errors.<br>
<br>
I am ok with ':set -package X11’ but couldn't find the right syntax.<br>
<br>
<br>
Alain<br>
On 20/07/2022 15:58, Brandon Allbery wrote:<br>
> Oh my. That suggests the corruption is in your main .stack while<br>
> trying to register the built packages. But at this point I have to<br>
> hand you off to someone who knows stack better than I do.<br>
<br>
</blockquote></div>