[xmonad] Trouble getting modular setup to compile

Frank Terbeck ft at bewatermyfriend.org
Sun Dec 30 22:35:12 CET 2012


Hey list,

I'm in the process of splitting up my setup into something more modular
within ~/.xmonad/lib - and most things were pretty straight forward with
that. However, I can't seem to get my layout definition to work. The
compiler flakes out like this:

[snip]
xmonad --recompile
Error detected while loading xmonad configuration file: /home/hawk/.xmonad/xmonad.hs

lib/XMonad/Config/FT/Layouts.hs:19:23:
    No instance for (XMonad.Layout.LayoutModifier.LayoutModifier
                       FullscreenFull a0)
      arising from a use of `smartBorders'
    Possible fix:
      add an instance declaration for
      (XMonad.Layout.LayoutModifier.LayoutModifier FullscreenFull a0)
    In the expression: smartBorders
    In the expression: smartBorders $ fullscreenFull Full
    In an equation for `fullScreenNoBorders':
        fullScreenNoBorders = smartBorders $ fullscreenFull Full

lib/XMonad/Config/FT/Layouts.hs:23:13:
    No instance for (XMonad.Layout.LayoutModifier.LayoutModifier
                       (ConfigurableBorder Ambiguity) a0)
      arising from a use of `onWorkspace'
    Possible fix:
      add an instance declaration for
      (XMonad.Layout.LayoutModifier.LayoutModifier
         (ConfigurableBorder Ambiguity) a0)
    In the expression: onWorkspace "fs" fullScreenNoBorders
    In the expression:
      onWorkspace "fs" fullScreenNoBorders
      $ onWorkspace "im" imLayout
        $ Full ||| Mirror tiled ||| tiled ||| Circle
    In an equation for `ftLayouts':
        ftLayouts
          = onWorkspace "fs" fullScreenNoBorders
            $ onWorkspace "im" imLayout
              $ Full ||| Mirror tiled ||| tiled ||| Circle

lib/XMonad/Config/FT/Layouts.hs:24:13:
    No instance for (XMonad.Layout.LayoutModifier.LayoutModifier
                       AddRoster a0)
      arising from a use of `onWorkspace'
    Possible fix:
      add an instance declaration for
      (XMonad.Layout.LayoutModifier.LayoutModifier AddRoster a0)
    In the expression: onWorkspace "im" imLayout
    In the second argument of `($)', namely
      `onWorkspace "im" imLayout
       $ Full ||| Mirror tiled ||| tiled ||| Circle'
    In the expression:
      onWorkspace "fs" fullScreenNoBorders
      $ onWorkspace "im" imLayout
        $ Full ||| Mirror tiled ||| tiled ||| Circle

lib/XMonad/Config/FT/Layouts.hs:25:45:
    No instance for (XMonad.Core.LayoutClass Circle a0)
      arising from a use of `|||'
    Possible fix:
      add an instance declaration for (XMonad.Core.LayoutClass Circle a0)
    In the second argument of `(|||)', namely `tiled ||| Circle'
    In the second argument of `(|||)', namely
      `Mirror tiled ||| tiled ||| Circle'
    In the second argument of `($)', namely
      `Full ||| Mirror tiled ||| tiled ||| Circle'

Please check the file for errors.
[snap]

The offending Code looks like this:

[snip]
module XMonad.Config.FT.Layouts
       ( ftLayouts ) where

import XMonad.Layout
import XMonad.Layout.Circle
import XMonad.Layout.Fullscreen
import XMonad.Layout.Grid
import XMonad.Layout.IM
import XMonad.Layout.Named
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Layout.ResizableTile

tiled = named "Tall" $ ResizableTall nmaster delta ratio []
  where nmaster = 1
        ratio = 0.67
        delta = 0.03

fullScreenNoBorders = smartBorders $ fullscreenFull Full

imLayout = withIM (15/100) (Role "roster") $ Grid

ftLayouts = onWorkspace "fs" fullScreenNoBorders $
            onWorkspace "im" imLayout $
            Full ||| Mirror tiled ||| tiled ||| Circle
[snap]

The fun part is that this code works in my monolithic setup.

Also, if I strip this down to something like:

ftLayouts = Full ||| Mirror tiled ||| tiled

...plus the required definitions and imports for that, the code compiles
and works. I don't know what is special about `smartBorders', `Circle'
and `onWorkspace'.

Maybe someone has an idea. It sure would reduce my level of frustration
right now. :-)

If it matters, this is with xmonad and xmonad-contrib, both from darcs
(updated a few minutes ago) and:

% ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.1


Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



More information about the xmonad mailing list