1
我在兩個不同的Linux安裝上有完全相同的Xmonad.hs配置,雖然它在計算機上工作正常,但我第一次安裝它,第二次安裝時出現錯誤。這裏是the configuration file:相同的Xmonad.hs配置在不同計算機上的相同版本下中斷
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import System.IO
main = do
xmproc <- spawnPipe "~/.cabal/bin/xmobar ~/.xmobarrc"
xmonad $ defaultConfig
{ manageHook = manageDocks <+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 80
}
, terminal = "urxvt"
, modMask = mod1Mask
, borderWidth = 1 --was "3"
, focusedBorderColor = "#4099FF"
, normalBorderColor = "#474747"
}
這裏是它導致在第二臺計算機上的錯誤(在nacr.us/media/xmonad.errors鏡像):
xmonad.hs:11:20:
Couldn't match expected type `ManageHook'
with actual type `xmonad-0.10:XMonad.Core.ManageHook'
In the first argument of `(<+>)', namely `manageDocks'
In the `manageHook' field of a record
In the second argument of `($)', namely
`defaultConfig
{manageHook = manageDocks <+> manageHook defaultConfig,
layoutHook = avoidStruts $ layoutHook defaultConfig,
logHook = dynamicLogWithPP
(xmobarPP
{ppOutput = hPutStrLn xmproc,
ppTitle = xmobarColor "green" "" . shorten 80}),
terminal = "urxvt", modMask = mod1Mask, borderWidth = 1,
focusedBorderColor = "#4099FF", normalBorderColor = "#474747"}'
此外,xmonad的兩個安裝在相同版本的Ubuntu 12.04上,並且安裝的xmonad版本是相同的(根據apt-cache show xmonad
)。
有什麼我忘了這個嗎?我不能爲了我的生活找出問題所在。
此外,這是我點文件回購與所有相關的文件:https://github.com/lelandbatey/configDebDev
這就是爲了我。運行ghc-pkg檢查發現版本0.11也被安裝,而我的配置文件是0.10。我發現Simon Michael在這裏提供的腳本相當有用:http://stackoverflow.com/questions/7961604/fixing-issues-noted-by-ghc-pkg-check –