Debian based platform:
sudo apt-get install stack
ln -nsf /path/to/.xmonad ~/
cd ~/.xmonad
stack exec xmonad -- --recompile
stack exec xmonad -- --restart
Open ~/.xmonad/xmonad.hs, `C-c C-l` away to check the types.
This will spawn a repl using stack-ghci or fail if it ain’t happy!