简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM