xmonad.hs コンパイルエラー

xmonad.hs コンパイルエラー

さまざまなレイアウトでさまざまなワークスペースを作成しようとして、このモジュールを見つけました。 https://hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Layout-PerWorkspace.html

次の行をインポートしてXMonad.Layout.PerWorkspace追加しました。xmonad.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

あなたは1つを見逃しています$...

一般的な形式は次のとおりです。

abc
$ xyz123 
$ xyz456

あなたは以下を持っているようですが:

abc
xyz123 $
xyz456 $

おすすめ記事