
Hello Weeble, My suggestions follow inline, * On Saturday, January 15 2011, Weeble wrote: ...
Have I done something wrong? At first I had even more problems, but I believe they were caused by my reckless use of "cabal install $SOMETHING" to try to fix previous problems, but which just ended up stacking more and more errors about conflicting versions. I got rid of these by doing "ghc-pkg list" and "ghc-pkg unregister --user $SOMETHING" for everything that turned up in the list of user packages.
It seems that cabal install pulled in the xmonad-core-0.9.2 which is on hackage, instead of using the one you built from the darcs repository (whose version 0.9.1 until a few minutes ago). The release on hackage and the repos on code.haskell.org are mutually incompatible.
I have a few questions: 1. How can I get rid of everything and start again?
rm ~/.cabal; rm ~/.ghc
2. What do ghc-pkg and cabal install actually do, and where do they put things? Does one of them call the other?
They put files in those directories named above if you run them as an unprivileged user.
3. When I install xmonad, where does it go?
same as 1,2
4. What is the relationship between the xmonad executable and my xmonad.hs file?
The ~/.cabal/bin/xmonad calls ghc to compile your xmonad.hs, and then runs that executable.
5. When does xmonad.hs get read and processed? Every time xmonad runs? Every time I edit it? Only when I do something to specifically request it?
It is recompiled whenever xmonad starts and the modification time of xmonad.hs is newer than the generated executable (~/.xmonad/xmonad-$arch-$os). When you request a recompile "xmonad --recompile" or M-q modification times do not matter.
6. When there's an error in my xmonad.hs, what am I left with? Does xmonad behave as it did with the last known good xmonad.hs? Or does it use some sort of safe configuration?
It runs the ~/.xmonad/xmonad-$arch-$os, which is the last good configuration. If that doesn't exist, you're stuck with the default.
7. What should I do in the future to avoid getting myself in a mess? Assuming that I will from time to time want to at least try out the latest version from darcs, what should I get using apt-get, what should I get with cabal, what (if anything) should I download source distributions for and what should I get from darcs?
You can run ~/.xmonad/xmonad-$arch-$os as your window manager even if your xmonad install is broken. But then changes to the xmonad.hs will be ignored, at least until you get a working xmonad install with the ~/.cabal/bin/xmonad in your path. Adam