Search code examples
linuxhaskellwindow-managersxmonad

Haskell parse error in my xmonad.hs config that i don't understand?


So i downloaded a xmonad wm config off of github that I thought looked nice, tried to use it and I got a parse error. I don't have too much Haskell knowledge but nothing looks wrong?

xmonad.hs:72:13: parse error on input ‘]’

Area in question:

addedKeys = [ ("M-<Return>"  , spawn myTerm),
          ("M-e"         , spawn "gedit"),
          ("M-i"         , spawn "firefox"),
          ("M-S-t"       , spawn "nemo"),
          ("M-<Left>"    , windows W.swapMaster >> windows W.focusDown),
        ]

Solution

  • This should work.

    addedKeys = [ ("M-<Return>"  , spawn myTerm),
                  ("M-e"         , spawn "gedit"),
                  ("M-i"         , spawn "firefox"),
                  ("M-S-t"       , spawn "nemo"),
                  ("M-<Left>"    , windows W.swapMaster >> windows W.focusDown)]
    

    There was a comma after the last item in the list which caused the error.