编译 xmonad.hs 时出错

编译 xmonad.hs 时出错

我试图使不同的工作区具有不同的布局,我发现了这个模块 - https://hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Layout-PerWorkspace.html

我导入XMonad.Layout.PerWorkspacexmonad.hs添加了这些行 -

onWorkspace ["2"] noBorders monocle $  -- layout l1 will be used on workspace "2".
onWorkspace ["9"] smartBorders Full $  -- layout l2 will be used on workspace "6".

myLayoutHook

-- The layout hook
myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts floats $
               mkToggle (NBFULL ?? NOBORDERS ?? EOT) myDefaultLayout

               onWorkspace ["2"] noBorders monocle $  -- layout l1 will be used on workspace "2".
               onWorkspace ["9"] smartBorders Full $  -- layout l2 will be used on workspace "6".

             where
               -- I've commented out the layouts I don't use.
               myDefaultLayout =     tall
                                 ||| noBorders monocle
                                 ||| floats
                                 ||| grid
                                 ||| smartBorders Full

但我在重新编译时遇到错误xmonad

> xmonad --recompile                                                                                                                         
XMonad will use ghc to recompile, because "/home/apoorv/.xmonad/build" does not exist.
Error detected while loading xmonad configuration file: /home/apoorv/.xmonad/xmonad.hs
xmonad.hs:620:14: error: parse error on input ‘where’
    |
620 |              where
    |              ^^^^^
Please check the file for errors.
Warning: Missing charsets in String to FontSet conversion

答案1

你缺少一个$...

一般格式为:

abc
$ xyz123 
$ xyz456

虽然你似乎有:

abc
xyz123 $
xyz456 $

相关内容