Tim70
Tim70

Reputation: 11

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),
        ]

Upvotes: 0

Views: 1208

Answers (1)

SANK
SANK

Reputation: 56

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.

Upvotes: 2

Related Questions