Problem getting simpleTabbed to work.

Hi all, Please go easy on me as I'm a noob at this xmonad/Haskell lark, but I've exhausted my Google-fu. I'm running xmonad on Ubuntu 12.04 and I'm very happy with it, it works very well and I've happily made some minor changes like changing the keybinding for the default ALT key and using xmobar etc. However, I've had some problems getting the simple Tabbed layout working, I wanted to replace the Full layout with the tabbed layout. Here is my xmonad.hs: import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Util.Run(spawnPipe) import XMonad.Util.EZConfig(additionalKeys) import System.IO import XMonad.Layout.Tabbed myLayout = ( Tall 1 (1/2) (3/100) ||| Mirror Tall ||| simpleTabbed ) myWorkspaces = ["1:terminal","2:web","3:XenDesktop","4:four","5:five","6:six","7:seven","8:media","9:Skype"] main = do xmproc <- spawnPipe "/usr/bin/xmobar /home/stefan/.xmobarrc" xmonad $ defaultConfig { manageHook = manageDocks <+> manageHook defaultConfig , workspaces = myWorkspaces , modMask = mod5Mask , layoutHook = avoidStruts $ layoutHook defaultConfig , logHook = dynamicLogWithPP xmobarPP { ppOutput = hPutStrLn xmproc , ppTitle = xmobarColor "green" "" . shorten 50 } } But when I restart xmonad using alt-q, I get the following error: Error detected while loading xmonad configuration file: /home/stefan/.xmonad/xmonad.hs xmonad.hs:8:55: Couldn't match expected type `Rational -> Rational -> Tall a0' with actual type `Window' Expected type: XMonad.Layout.LayoutModifier.ModifiedLayout (XMonad.Layout.Decoration.Decoration TabbedDecoration XMonad.Layout.Decoration.DefaultShrinker) XMonad.Layout.Simplest.Simplest (Rational -> Rational -> Tall a0) Actual type: XMonad.Layout.LayoutModifier.ModifiedLayout (XMonad.Layout.Decoration.Decoration TabbedDecoration XMonad.Layout.Decoration.DefaultShrinker) XMonad.Layout.Simplest.Simplest Window In the second argument of `(|||)', namely `simpleTabbed' In the second argument of `(|||)', namely `Mirror Tall ||| simpleTabbed' Please check the file for errors. The only difference between the above xmonad.hs file and a working one is the entire myLayout line has been added to the above, following the guide on the xmonad page and some other guides Google turned up. So, can aybody point me to where it's going wrong? I could not find any reference to `Rational -> Rational -> Tall a0`. Thanks in advance. Stefan.

On Fri, Jan 25, 2013 at 3:13 PM, Stefan Pynappels < stefan.pynappels@sptechnical.co.uk> wrote:
myLayout = ( Tall 1 (1/2) (3/100) ||| Mirror Tall ||| simpleTabbed )
Notice that Tall takes 3 parameters, but you're then using it again without any parameters under control of Mirror. The error message is complaining about the missing parameters; this tends to look a bit odd in Haskell, because sometimes that's an entirely legitimate thing to do --- just, not here. Usually we abstract that out to look something like myLayout = tall ||| Mirror tall ||| simpleTabbed where tall = Tall 1 (1/2) (3/100) but if you prefer to do it inline then you'll want myLayout = Tall 1 (1/2) (3/100) ||| Mirror (Tall 1 (1/2) (3/100)) ||| simpleTabbed -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Hi Brandon, Thanks for the quick reply, I had tried that but had the opening bracket to the right of the "Tall" instead of to the left! So now I don't get any parsing errors, but neither do I have any tabs. I have Tall, Mirror Tall and Full, just like before.... Any further pointer? Thanks again, Stefan On Fri, Jan 25, 2013 at 03:20:09PM -0500, Brandon Allbery wrote:
On Fri, Jan 25, 2013 at 3:13 PM, Stefan Pynappels <[1]stefan.pynappels@sptechnical.co.uk> wrote:
myLayout = ( Tall 1 (1/2) (3/100) ||| Mirror Tall ||| simpleTabbed )
Notice that Tall takes 3 parameters, but you're then using it again without any parameters under control of Mirror.  The error message is complaining about the missing parameters; this tends to look a bit odd in Haskell, because sometimes that's an entirely legitimate thing to do --- just, not here. Usually we abstract that out to look something like   myLayout = tall ||| Mirror tall ||| simpleTabbed    where     tall = Tall 1 (1/2) (3/100) but if you prefer to do it inline then you'll want   myLayout = Tall 1 (1/2) (3/100) ||| Mirror (Tall 1 (1/2) (3/100)) ||| simpleTabbed -- brandon s allbery kf8nh                sine nomine associates [2]allbery.b@gmail.com                  [3]ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad     [4]http://sinenomine.net
References
1. mailto:stefan.pynappels@sptechnical.co.uk 2. mailto:allbery.b@gmail.com 3. mailto:ballbery@sinenomine.net 4. http://sinenomine.net/

On Fri, Jan 25, 2013 at 3:59 PM, Stefan Pynappels < stefan.pynappels@sptechnical.co.uk> wrote:
Thanks for the quick reply, I had tried that but had the opening bracket to the right of the "Tall" instead of to the left!
So now I don't get any parsing errors, but neither do I have any tabs. I have Tall, Mirror Tall and Full, just like before....
Looks like your config record has , layoutHook = avoidStruts $ layoutHook defaultConfig and myLayout isn't actually referenced anywhere. You want to change the above to , layoutHook = avoidStruts myLayout -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Hi Brandon, That's great, that's done it. I figured it was something simple in the syntax. I had replaced defaultConfig with myLayout, but that didn't work, now it seems logical to remove the $ layoutHook too. Thanks again. Stefan On Fri, Jan 25, 2013 at 04:14:08PM -0500, Brandon Allbery wrote:
On Fri, Jan 25, 2013 at 3:59 PM, Stefan Pynappels <[1]stefan.pynappels@sptechnical.co.uk> wrote:
Thanks for the quick reply, I had tried that but had the opening bracket to the right of the "Tall" instead of to the left! So now I don't get any parsing errors, but neither do I have any tabs. I have Tall, Mirror Tall and Full, just like before....
Looks like your config record has     , layoutHook = avoidStruts  $  layoutHook defaultConfig and myLayout isn't actually referenced anywhere.  You want to change the above to     , layoutHook = avoidStruts myLayout -- brandon s allbery kf8nh                sine nomine associates [2]allbery.b@gmail.com                  [3]ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad     [4]http://sinenomine.net
References
1. mailto:stefan.pynappels@sptechnical.co.uk 2. mailto:allbery.b@gmail.com 3. mailto:ballbery@sinenomine.net 4. http://sinenomine.net/
participants (2)
-
Brandon Allbery
-
Stefan Pynappels