Can't use any of the contrib modules

I have only just started using Xmonad so apologies if this is a very basic question. I wanted to try out some of the modules in the contrib list. As a first step in learning I copied this demonstration xmonad.hs from the documentation: ------------------------------------- import XMonad import XMonad.Layout.Tabbed import XMonad.Layout.Accordion import XMonad.Layout.NoBorders mylayoutHook = Full ||| noBorders (tabbed shrinkText defaultTConf) ||| Accordion main = xmonad $ defaultConfig { layoutHook = mylayoutHook } ---------------------------------------------------------- But when I try to recompile I get: monad.hs:7:58: Not in scope: `defaultTConf' Can anyone tell me what is going wrong here please? Anthony -- Anthony Campbell - ac@acampbell.org.uk Microsoft-free zone - Using Debian GNU/Linux http://www.acampbell.org.uk - sample my ebooks at http://www.smashwords.com/profile/view/acampbell

Anthony Campbell
monad.hs:7:58: Not in scope: `defaultTConf'
I found the page below, which has some examples that might help you accomplish the same thing. http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Tabbed.html

I'd be very grateful if someone else could try this out and see if it works for them - perhaps I am doing something very stupid.
It doesn't work for me either: Not in scope: `defaultTConf'. So it's not something you're doing. The example is just out of date. I didn't mention it earlier, but I searched both hayoo and hoogle for "defaultTConf", but no luck. Whatever package contained it seems to be gone. Can you describe what it is that you want to accomplish? From reading the example, it looks like you just want to get tabs on your windows. If so, something like this might work. Fair warning: I verified that it compiles, but I haven't tested it. import XMonad import XMonad.Layout.Tabbed import XMonad.Config.Desktop ( desktopConfig, desktopLayoutModifiers ) myLayouts = tabbed shrinkText defaultTheme ||| Full main = xmonad $ desktopConfig { layoutHook = desktopLayoutModifiers $ myLayouts }

On 16 Sep 2011, Amy de Buitléir wrote:
I'd be very grateful if someone else could try this out and see if it works for them - perhaps I am doing something very stupid.
It doesn't work for me either: Not in scope: `defaultTConf'. So it's not something you're doing. The example is just out of date.
I didn't mention it earlier, but I searched both hayoo and hoogle for "defaultTConf", but no luck. Whatever package contained it seems to be gone.
Can you describe what it is that you want to accomplish? From reading the example, it looks like you just want to get tabs on your windows. If so, something like this might work. Fair warning: I verified that it compiles, but I haven't tested it.
import XMonad import XMonad.Layout.Tabbed import XMonad.Config.Desktop ( desktopConfig, desktopLayoutModifiers )
myLayouts = tabbed shrinkText defaultTheme ||| Full
main = xmonad $ desktopConfig { layoutHook = desktopLayoutModifiers $ myLayouts }
Thanks very much - I'm glad it isn't just me! I didn't particularly want tabs; I was just trying to get at least one of the modules to work, and then try some of the others. But I have had similar problems with all those I tried; often they say the module just doesn't exist when I try to "import" it. I'm beginning to think that much of this contrib stuff is out of date. Bug report needed perhaps? I shall stick with the basic set-up for the moment - it's pretty good for me, really, because I like to work fullscreen most of the time. -- Anthony Campbell - ac@acampbell.org.uk Microsoft-free zone - Using Debian GNU/Linux http://www.acampbell.org.uk - sample my ebooks at http://www.smashwords.com/profile/view/acampbell

Quoting Anthony Campbell
I wanted to try out some of the modules in the contrib list. As a first step in learning I copied this demonstration xmonad.hs from the documentation:
------------------------------------- import XMonad
import XMonad.Layout.Tabbed import XMonad.Layout.Accordion import XMonad.Layout.NoBorders
mylayoutHook = Full ||| noBorders (tabbed shrinkText defaultTConf) ||| Accordion
main = xmonad $ defaultConfig { layoutHook = mylayoutHook }
----------------------------------------------------------
What documentation is that coming from? In any case, I don't see any "defaultTConf" in the XMonad.Layout.Tabbed documentation (which is the module I assume would provide it, if any did), but I do see a defaultTheme. Perhaps that's what you want. ~d

On 16 Sep 2011, wagnerdm@seas.upenn.edu wrote:
Quoting Anthony Campbell
: I wanted to try out some of the modules in the contrib list. As a first step in learning I copied this demonstration xmonad.hs from the documentation:
------------------------------------- import XMonad
import XMonad.Layout.Tabbed import XMonad.Layout.Accordion import XMonad.Layout.NoBorders
mylayoutHook = Full ||| noBorders (tabbed shrinkText defaultTConf) ||| Accordion
main = xmonad $ defaultConfig { layoutHook = mylayoutHook }
----------------------------------------------------------
What documentation is that coming from?
In any case, I don't see any "defaultTConf" in the XMonad.Layout.Tabbed documentation (which is the module I assume would provide it, if any did), but I do see a defaultTheme. Perhaps that's what you want.
~d
This comes from Xmonad-Doc-Extending, which I found at http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Doc-Extending.html#The_L... -- Anthony Campbell - ac@acampbell.org.uk Microsoft-free zone - Using Debian GNU/Linux http://www.acampbell.org.uk - sample my ebooks at http://www.smashwords.com/profile/view/acampbell

Quoting Anthony Campbell
This comes from Xmonad-Doc-Extending, which I found at http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Doc-Extending.html#The_L...
I've pushed a documentation patch fixing this and a few other errors in the documentation there. ~d

On 16 Sep 2011, wagnerdm@seas.upenn.edu wrote:
Quoting Anthony Campbell
: This comes from Xmonad-Doc-Extending, which I found at http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Doc-Extending.html#The_L...
I've pushed a documentation patch fixing this and a few other errors in the documentation there.
~d
Thanks for this, but I'm still getting errors here. I copied the sample xmonad.hs from "Extending the layout hook": ------------------------------------------------------------ import XMonad import XMonad.Layout.Tabbed import XMonad.Layout.Accordion import XMonad.Layout.NoBorders mylayoutHook = Full ||| noBorders (tabbed shrinkText defaultTConf) ||| Accordion main = xmonad $ defaultConfig { layoutHook = mylayoutHook } ------------------------------------------------- But recompiling gives an error: xmonad.hs:3:5: parse error on input `import' -- Anthony Campbell - ac@acampbell.org.uk Microsoft-free zone - Using Debian GNU/Linux http://www.acampbell.org.uk - sample my ebooks at http://www.smashwords.com/profile/view/acampbell

On 19 September 2011 18:03, Anthony Campbell
import XMonad
import XMonad.Layout.Tabbed import XMonad.Layout.Accordion import XMonad.Layout.NoBorders
mylayoutHook = Full ||| noBorders (tabbed shrinkText defaultTConf) ||| Accordion
main = xmonad $ defaultConfig { layoutHook = mylayoutHook } -------------------------------------------------
But recompiling gives an error:
xmonad.hs:3:5: parse error on input `import'
What's above that? If you're indenting all of your definitions, you need to indent the "import XMonad" line as well. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On 19 Sep 2011, Ivan Lazar Miljenovic wrote:
On 19 September 2011 18:03, Anthony Campbell
wrote: import XMonad
import XMonad.Layout.Tabbed import XMonad.Layout.Accordion import XMonad.Layout.NoBorders
mylayoutHook = Full ||| noBorders (tabbed shrinkText defaultTConf) ||| Accordion
main = xmonad $ defaultConfig { layoutHook = mylayoutHook } -------------------------------------------------
But recompiling gives an error:
xmonad.hs:3:5: parse error on input `import'
What's above that?
If you're indenting all of your definitions, you need to indent the "import XMonad" line as well.
Thank you - I am (Obviously!) completely ignorant of Haskell. I just copied the example "as is". I changed the indentation of the import lines but now I get errors lower down in the script, e.g. xmonad.hs:8:9: parse error on input `mylayoutHook' I think this is something to do with indentation too, because changing it gives different errors. But in spite of fiddling I can't get it to work. Perhaps I'd better give up unless/until I learn some Haskell. -- Anthony Campbell - ac@acampbell.org.uk Microsoft-free zone - Using Debian GNU/Linux http://www.acampbell.org.uk - sample my ebooks at http://www.smashwords.com/profile/view/acampbell

On 19 Sep 2011, Anthony Campbell wrote: Sorry to follow up to mself, but I finally got the thing to compile, though with one modification. I removed all the indents and, following a hint I'd been given earlier on the Haskell beginners list, I was still getting an "out of scope" error until I replaced defaultTConf with defaultTheme. The xmonad.hs now reads: --------------------------------------------- import XMonad import XMonad.Layout.Tabbed import XMonad.Layout.Accordion import XMonad.Layout.NoBorders mylayoutHook = Full ||| noBorders (tabbed shrinkText defaultTheme) ||| Accordion main = xmonad $ defaultConfig { layoutHook = mylayoutHook } ------------------------------------------ I think the documentation should be ameneded to include this change? -- Anthony Campbell - ac@acampbell.org.uk Microsoft-free zone - Using Debian GNU/Linux http://www.acampbell.org.uk - sample my ebooks at http://www.smashwords.com/profile/view/acampbell

Quoting Anthony Campbell
On 19 Sep 2011, Anthony Campbell wrote:
getting an "out of scope" error until I replaced defaultTConf with defaultTheme. The xmonad.hs now reads: I think the documentation should be ameneded to include this change?
This is exactly what I changed with the patch I pushed (+ a few other inconsistencies elsewhere), and exactly the change I suggested three days ago (along with several others). Note that the website does not show the documentation from darcs xmonad, but from the latest release of xmonad. Please "darcs pull", then rebuild the documentation locally on your machine to see the change. The indentation problems suck, I agree, but there's very little we can do about that: we really want to typeset the Haskell code distinctly from the commentary, and indentation is one commonly-accepted way to make the distinction. All the Haskell code should be at the same indentation level, so that a complete copy-and-paste should work; I'm sorry that it didn't for you. ~d

On 19 Sep 2011, wagnerdm@seas.upenn.edu wrote:
Quoting Anthony Campbell
: On 19 Sep 2011, Anthony Campbell wrote:
getting an "out of scope" error until I replaced defaultTConf with defaultTheme. The xmonad.hs now reads: I think the documentation should be ameneded to include this change?
This is exactly what I changed with the patch I pushed (+ a few other inconsistencies elsewhere), and exactly the change I suggested three days ago (along with several others). Note that the website does not show the documentation from darcs xmonad, but from the latest release of xmonad. Please "darcs pull", then rebuild the documentation locally on your machine to see the change.
Thanks; I knew nothing about darcs but I got it and ran: darcs get http://code.haskell.org/XMonadContrib This seemed to complete (with some CRC errors which are said not to be serious) but I think I need to something else to rebuild the documentation though I don't know what. Probably I'd better give up at this stage as I'm getting well out of my depth! -- Anthony Campbell - ac@acampbell.org.uk Microsoft-free zone - Using Debian GNU/Linux http://www.acampbell.org.uk - sample my ebooks at http://www.smashwords.com/profile/view/acampbell

Quoting Anthony Campbell
On 19 Sep 2011, wagnerdm@seas.upenn.edu wrote:
Quoting Anthony Campbell
: On 19 Sep 2011, Anthony Campbell wrote:
getting an "out of scope" error until I replaced defaultTConf with defaultTheme. The xmonad.hs now reads: I think the documentation should be ameneded to include this change?
This is exactly what I changed with the patch I pushed (+ a few other inconsistencies elsewhere), and exactly the change I suggested three days ago (along with several others). Note that the website does not show the documentation from darcs xmonad, but from the latest release of xmonad. Please "darcs pull", then rebuild the documentation locally on your machine to see the change.
Thanks; I knew nothing about darcs but I got it and ran:
darcs get http://code.haskell.org/XMonadContrib
This seemed to complete (with some CRC errors which are said not to be serious) but I think I need to something else to rebuild the documentation though I don't know what. Probably I'd better give up at this stage as I'm getting well out of my depth!
Once in the XMonadContrib directory, "cabal configure" followed by "cabal haddock" is supposed to Just Work. Let us know if it doesn't, or hop on #xmonad or #haskell for a more interactive experience. g'luck, ~d
participants (4)
-
Amy de Buitléir
-
Anthony Campbell
-
Ivan Lazar Miljenovic
-
wagnerdm@seas.upenn.edu