tiny config file gives error, please can someone take a quick look at it?

Hello. I want to use xmobar and to switch "alt" with "super" key for xmonad key binding. I have therefore setup this config file (someone gave it to me, I don't know Haskell). But it gives me errors and I can't figure out why: import XMonad import XMonad.Hooks.DynamicLog main = xmonad =<< statusBar cmd pp kb conf where cmd = "xmobar" pp = xmobarPP kb = XConfig {XMonad.modMask = modMask} = (modMask, xK_b) conf = myConfig myConfig = defaultConfig { borderWidth = 2 , terminal = "urxvt" , modMask = mod4mask } So how do I fix this program? How do I configure xmobar to start with xmonad (and not hide behind opened windows) and swtich "alt" with "super"? Thanks in advance for your time and kind concern. jenia

On Wed, Dec 24, 2014 at 11:40 AM, jenia.ivlev
I have therefore setup this config file (someone gave it to me, I don't know Haskell). But it gives me errors and I can't figure out why:
It would be helpful to include the full error messages.
import XMonad import XMonad.Hooks.DynamicLog
main = xmonad =<< statusBar cmd pp kb conf
Haskell is sensitive to indentation; the fact that this and myConfig are indented relative to the imports can itself lead to errors. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

That's my error message. (I don't understand why I get undisplayable characters, like that "a" with the hat). Error detected while loading xmonad configuration file: /home/jenia-xmonad/.xmonad/xmonad.hs xmonad.hs:8:45: parse error on input â=â Please check the file for errors.

On Wed, Dec 24, 2014 at 12:25 PM, jenia.ivlev
That's my error message. (I don't understand why I get undisplayable characters, like that "a" with the hat).
That looks like Unicode vs. iso8859 confusion. It was trying to print "smart quotes".
Error detected while loading xmonad configuration file: /home/jenia-xmonad/.xmonad/xmonad.hs xmonad.hs:8:45: parse error on input â=â Please check the file for errors.
The line indicated appears to be kb = XConfig {XMonad.modMask = modMask} = (modMask, xK_b) which is in fact incorrect. I suspect it was supposed to be kb XConfig {XMonad.modMask = modMask} = (modMask, xK_b) which uses record syntax in a pattern to unpack modMask from an XConfig parameter. You might find it less confusing with parentheses: kb (XConfig {XMonad.modMask = modMask}) = (modMask, xK_b) -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Brandon Allbery
On Wed, Dec 24, 2014 at 12:25 PM, jenia.ivlev
wrote: That's my error message. (I don't understand why I get undisplayable characters, like that "a" with the hat).
That looks like Unicode vs. iso8859 confusion. It was trying to print "smart quotes".
Error detected while loading xmonad configuration file: /home/jenia-xmonad/.xmonad/xmonad.hs xmonad.hs:8:45: parse error on input â=â Please check the file for errors.
The line indicated appears to be
kb = XConfig {XMonad.modMask = modMask} = (modMask, xK_b)
which is in fact incorrect. I suspect it was supposed to be
kb XConfig {XMonad.modMask = modMask} = (modMask, xK_b)
which uses record syntax in a pattern to unpack modMask from an XConfig parameter. You might find it less confusing with parentheses:
kb (XConfig {XMonad.modMask = modMask}) = (modMask, xK_b)
Thanks a lot. It works exept for one line: `, modMask = mod4mask` The error message is the following: Error detected while loading xmonad configuration file: /home/jenia-xmonad/.xmonad/xmonad.hs xmonad.hs:13:38: Not in scope: âmod4maskâ Perhaps you meant one of these: âmod4Maskâ (imported from XMonad), âmodMaskâ (imported from XMonad), âmod1Maskâ (imported from XMonad) Please check the file for errors. ======================================================================== Lets me repaste the config file: import XMonad import XMonad.Hooks.DynamicLog main = xmonad =<< statusBar cmd pp kb conf where cmd = "xmobar" pp = xmobarPP kb (XConfig {XMonad.modMask = modMask}) = (modMask, xK_b) conf = myConfig myConfig = defaultConfig { borderWidth = 2 , terminal = "urxvt" , modMask = mod4mask <----------- here is the mistake } ======================================================================== Can you tell me please how to fix this? Thanks again for your kind help.

On Wed, Dec 24, 2014 at 1:20 PM, jenia.ivlev
xmonad.hs:13:38: Not in scope: âmod4maskâ Perhaps you meant one of these: âmod4Maskâ (imported from XMonad), âmodMaskâ (imported from XMonad), âmod1Maskâ (imported from XMonad)
The first suggestion is the correct one. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (2)
-
Brandon Allbery
-
jenia.ivlev@gmail.com