
New patches:

[make keyActions and buttonActions dynamically modifiable.
David Roundy <droundy@darcs.net>**20071108160423
 This makes possible simple self-modifying toggle keybindings,
 the removal of keybindings, etc.  Given that we were already
 storing a duplicate reference to these maps, I see no downside
 to allowing extensions to modify them.
] 
<
> {
hunk ./XMonad/Core.hs 50
     { windowset    :: !WindowSet           -- ^ workspace list
     , mapped       :: !(S.Set Window)      -- ^ the Set of mapped windows
     , waitingUnmap :: !(M.Map Window Int)  -- ^ the number of expected UnmapEvents
-    , dragging     :: !(Maybe (Position -> Position -> X (), X ())) }
+    , dragging     :: !(Maybe (Position -> Position -> X (), X ()))
+    , keyActions    :: !(M.Map (KeyMask, KeySym) (X ()))
+                                      -- ^ a mapping of key presses to actions
+    , buttonActions :: !(M.Map (KeyMask, Button) (Window -> X ()))
+                                      -- ^ a mapping of button presses to actions
+    }
 
 data XConf = XConf
     { display       :: Display        -- ^ the X11 display
hunk ./XMonad/Core.hs 63
     , theRoot       :: !Window        -- ^ the root window
     , normalBorder  :: !Pixel         -- ^ border color of unfocused windows
     , focusedBorder :: !Pixel         -- ^ border color of the focused window
-    , keyActions    :: !(M.Map (KeyMask, KeySym) (X ()))
-                                      -- ^ a mapping of key presses to actions
-    , buttonActions :: !(M.Map (KeyMask, Button) (Window -> X ()))
-                                      -- ^ a mapping of button presses to actions
     }
 
 -- todo, better name
hunk ./XMonad/Main.hs 74
             , config        = xmc
             , theRoot       = rootw
             , normalBorder  = nbc
-            , focusedBorder = fbc
-            , keyActions    = keys xmc xmc
-            , buttonActions = mouseBindings xmc xmc }
+            , focusedBorder = fbc }
         st = XState
             { windowset     = initialWinset
             , mapped        = S.empty
hunk ./XMonad/Main.hs 79
             , waitingUnmap  = M.empty
-            , dragging      = Nothing }
+            , dragging      = Nothing
+            , keyActions    = keys xmc xmc
+            , buttonActions = mouseBindings xmc xmc }
 
     xSetErrorHandler -- in C, I'm too lazy to write the binding: dons
 
hunk ./XMonad/Main.hs 132
     | t == keyPress = withDisplay $ \dpy -> do
         s  <- io $ keycodeToKeysym dpy code 0
         mClean <- cleanMask m
-        ks <- asks keyActions
+        ks <- gets keyActions
         userCode $ whenJust (M.lookup (mClean, s) ks) id
 
 -- manage a new window
hunk ./XMonad/Main.hs 182
     -- grabbed in grabButtons. Otherwise, it's click-to-focus.
     isr <- isRoot w
     m <- cleanMask $ ev_state e
-    ba <- asks buttonActions
+    ba <- gets buttonActions
     if isr then userCode $ whenJust (M.lookup (m, b) ba) ($ ev_subwindow e)
            else focus w
     sendMessage e -- Always send button events.
hunk ./XMonad/Main.hs 261
     XConf { display = dpy, theRoot = rootw } <- ask
     let grab kc m = io $ grabKey dpy kc m rootw True grabModeAsync grabModeAsync
     io $ ungrabKey dpy anyKey anyModifier rootw
-    ks <- asks keyActions
+    ks <- gets keyActions
     forM_ (M.keys ks) $ \(mask,sym) -> do
          kc <- io $ keysymToKeycode dpy sym
          -- "If the specified KeySym is not defined for any KeyCode,
hunk ./XMonad/Main.hs 276
                                            grabModeAsync grabModeSync none none
     io $ ungrabButton dpy anyButton anyModifier rootw
     ems <- extraModifiers
-    ba <- asks buttonActions
+    ba <- gets buttonActions
     mapM_ (\(m,b) -> mapM_ (grab b . (m .|.)) ems) (M.keys $ ba)
}

Context:

[maybe False (const True) -> isJust. spotted by shachaf
Don Stewart <dons@galois.com>**20071108003539] 
[typo
Don Stewart <dons@galois.com>**20071108000259] 
[imports not needed in example now
Don Stewart <dons@galois.com>**20071107032346] 
[Provide top level XMonad.hs export module
Don Stewart <dons@galois.com>**20071107030617] 
[point to where defns for config stuff can be found
Don Stewart <dons@galois.com>**20071107020801] 
[Fix haddock comment
Spencer Janssen <sjanssen@cse.unl.edu>**20071107030510] 
[fall back to previous ~/.xmonad/xmonad if recompilation fails
Lukas Mai <l.mai@web.de>**20071107015309] 
[recommend --user
Don Stewart <dons@galois.com>**20071106221004] 
[add CONFIG with details of how to configure
Don Stewart <dons@galois.com>**20071105040741] 
[Run only 50 tests per property, decreases test time by 10 seconds on my system
Spencer Janssen <sjanssen@cse.unl.edu>**20071105064944] 
[Remove stale comment
Spencer Janssen <sjanssen@cse.unl.edu>**20071105063731] 
[Use Cabal's optimization flags rather than -O
Spencer Janssen <sjanssen@cse.unl.edu>**20071105061759] 
[Build the whole thing in the test hook
Spencer Janssen <sjanssen@cse.unl.edu>**20071105061615] 
[-Werror
Spencer Janssen <sjanssen@cse.unl.edu>**20071105060326] 
[Remove superfluous 'extensions:' field
Spencer Janssen <sjanssen@cse.unl.edu>**20071105034515] 
[Use configurations in xmonad.cabal
Spencer Janssen <sjanssen@cse.unl.edu>**20071105033428] 
[~/.xmonad/Main.hs is now ~/.xmonad/xmonad.hs !
Don Stewart <dons@galois.com>**20071105032655] 
[makeMain -> xmonad
Don Stewart <dons@galois.com>**20071105031203] 
[-Wall police
Don Stewart <dons@galois.com>**20071105022202] 
[remember to compile the xmonad library also with the usual ghc-optoins
Don Stewart <dons@galois.com>**20071105022127] 
[EventLoop -> Core, DefaultConfig -> Config
Don Stewart <dons@galois.com>**20071105021705] 
[clean up DefaultConfig.hs
Don Stewart <dons@galois.com>**20071105021142] 
[clean up some weird formatting/overboard strictness annotations
Don Stewart <dons@galois.com>**20071105011400] 
[Update pragmas for GHC 6.8 compatibility
Spencer Janssen <sjanssen@cse.unl.edu>**20071104215507] 
[Use the layout and workspaces values from the actual configuration used
Spencer Janssen <sjanssen@cse.unl.edu>**20071104020320] 
[Float handler out of makeMain, make keys and mouseBindings dependent on XConfig for easy modMask switching
Spencer Janssen <sjanssen@cse.unl.edu>**20071102025924] 
[We can't rely on the executable name, because it may be 'Main'
Spencer Janssen <sjanssen@cse.unl.edu>**20071101205057] 
[Get defaultGaps from the current config, not the default one
Spencer Janssen <sjanssen@cse.unl.edu>**20071101205025] 
[exposed-modules
Spencer Janssen <sjanssen@cse.unl.edu>**20071101193331] 
[Hierarchify
Spencer Janssen <sjanssen@cse.unl.edu>**20071101180846] 
[Main.hs -> DefaultConfig.hs, add new Main.hs with 'buildLaunch'
Spencer Janssen <sjanssen@cse.unl.edu>**20071101175749] 
[Layouts.Choose: handle ReleaseResources
Spencer Janssen <sjanssen@cse.unl.edu>**20071101152302] 
[Layouts.Choose: send Hide to non-selected layout
Spencer Janssen <sjanssen@cse.unl.edu>**20071101151147] 
[Export mirrorRect
Spencer Janssen <sjanssen@cse.unl.edu>**20071101085631] 
[Only export main from Main
Spencer Janssen <sjanssen@cse.unl.edu>**20071101082326] 
[Add readsLayout, remove the existential from XConfig
Spencer Janssen <sjanssen@cse.unl.edu>**20071101082155] 
[Delete Main.hs-boot!
Spencer Janssen <sjanssen@cse.unl.edu>**20071101080045] 
[Remove manageHook from Main.hs-boot
Spencer Janssen <sjanssen@cse.unl.edu>**20071101075308] 
[Remove workspaces from Main.hs-boot
Spencer Janssen <sjanssen@cse.unl.edu>**20071101074556] 
[-Wall police
Spencer Janssen <sjanssen@cse.unl.edu>**20071101074411] 
[Eliminate defaultTerminal
Spencer Janssen <sjanssen@cse.unl.edu>**20071101073147] 
[Store user configuration in XConf
Spencer Janssen <sjanssen@cse.unl.edu>**20071101072308] 
[This is a massive update, here's what has changed:
Spencer Janssen <sjanssen@cse.unl.edu>**20071101064318
  * Read is no longer a superclass of Layout
  * All of the core layouts have moved to the new Layouts.hs module
  * Select has been replaced by the new statically typed Choose combinator,
    which is heavily based on David Roundy's NewSelect proposal for
    XMonadContrib.  Consequently:
     - Rather than a list of choosable layouts, we use the ||| combinator to
       combine several layouts into a single switchable layout
     - We've lost the capability to JumpToLayout and PrevLayout.  Both can be
       added with some effort
] 
[more precise X11 version required
Don Stewart <dons@galois.com>**20071031203241] 
[tweaks to todo
Don Stewart <dons@galois.com>**20071031164618] 
[HEADS UP: remove X11-extras dependency, depend on X11 >= 1.3.0
Don Stewart <dons@galois.com>**20071030220824
 
 The X11-extras library has been merged into the larger X11 library,
 so we now drop the dependency on X11-extras, and instead build 
 against the new X11 library.
 
 If you apply this patch you must build and install X11-1.3.0 or greater
 first,
 
   http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11-1.3.0
 
 You can also go ahead and wipe X11-extras from GHC's memory, (for ghci to work
 out of the box with the testsuite)
 
   $ ghc-pkg unregister X11-extras
   $ ghc-pkg unregister --user X11-extras
 
] 
[cleaner version of main/config inversion.
David Roundy <droundy@darcs.net>**20071029184823] 
[New windows start in the iconic state
Spencer Janssen <sjanssen@cse.unl.edu>**20071028063949] 
[add text on using xprop to find client names
Don Stewart <dons@galois.com>**20071027163031] 
[add text reminding people to run mod-shift-space
Don Stewart <dons@galois.com>**20071026225228] 
[StackSet.hs: (insertUp): remove comments about new window being made master window, since that clearly isn't true.
Brent Yorgey <byorgey@gmail.com>**20071022210856] 
[Replace 'findIndex' with 'findTag', which more accurately describes what the function does.
Brent Yorgey <byorgey@gmail.com>**20071022204105
 I realize this is a big change, but the name 'findIndex' was confusing for me, since I expected it to return some sort of integer.  What it actually does, of course, is return a workspace tag, which might be more general than an index.
 Of course, this change breaks several contrib modules; I'll submit a patch to make the change there as well.
] 
[StackSet.hs: (ensureTags): elaborate into a more descriptive comment.
Brent Yorgey <byorgey@gmail.com>**20071022202212] 
[StackSet.hs: remove dead code.
Brent Yorgey <byorgey@gmail.com>**20071022192636] 
[StackSet.hs: (differentiate): 'Texture' doesn't mean anything to me; replace with a more descriptive comment.
Brent Yorgey <byorgey@gmail.com>**20071022191333] 
[StackSet.hs: (new): better comment; 'm' is not an integer, it is a list of screen descriptions.
Brent Yorgey <byorgey@gmail.com>**20071022183411] 
[StackSet.hs: align some comments
Brent Yorgey <byorgey@gmail.com>**20071022161601] 
[StackSet.hs: small grammar fix and better flow in comment
Brent Yorgey <byorgey@gmail.com>**20071022160858] 
[StackSet.hs: better comments regarding hidden/visible workspace tracking for Xinerama
Brent Yorgey <byorgey@gmail.com>**20071022160239
 I'm not 100% sure that I understand what's going on here, but it seems as though the comment still described an older state of affairs.  I don't see any Map Workspace Screen keeping track of visible workspaces.
] 
[make setLayout a bit more inclusive.
David Roundy <droundy@darcs.net>**20071024231250] 
[Add Config.terminal
Spencer Janssen <sjanssen@cse.unl.edu>**20071024105354] 
[explain that you need ghc as well
Don Stewart <dons@galois.com>**20071024030520] 
[xmonad, not XMonad
Spencer Janssen <sjanssen@cse.unl.edu>**20071023234900] 
[STYLE: enlarge on existing principles
gwern0@gmail.com**20071023225225
 Comments: the -Wall thing was just trying to say -Wall -Werror should work. The license thing was too narrow - or are my public domain contributions unwelcome because they are not BSD-3? I think comments are most important for exported functions users will use; it isn't so important for helper functions (used only in the module) to be very well-documented, right?
] 
[start on style guide
Don Stewart <dons@galois.com>**20071023221422] 
[Operations.hs: flip maybe id  is  fromMaybe
Eric Mertens <emertens@galois.com>**20071018231418] 
[Deobfuscate Tall layout
Eric Mertens <emertens@galois.com>**20071018231329] 
[setInitialProperties after placing windows
Spencer Janssen <sjanssen@cse.unl.edu>*-20071019201310] 
[setInitialProperties after placing windows
Spencer Janssen <sjanssen@cse.unl.edu>**20071019201310] 
[Ignore borders in the stored RationalRects of floating windows.
Spencer Janssen <sjanssen@cse.unl.edu>*-20071019063922
 Also, add 'floatWindow' which computes the actual Rectangle for that window,
 including border.
] 
[Only assign workspace keys up to xK_9.  Related to bug #63
Spencer Janssen <sjanssen@cse.unl.edu>**20071019083746] 
[Ignore borders in the stored RationalRects of floating windows.
Spencer Janssen <sjanssen@cse.unl.edu>**20071019063922
 Also, add 'floatWindow' which computes the actual Rectangle for that window,
 including border.
] 
[I prefer fmap over liftM
Spencer Janssen <sjanssen@cse.unl.edu>**20071019063104] 
[change 0/1/3 to named states, per X11-extras darcs head
Devin Mullins <me@twifkak.com>**20071018021651] 
[make xmonad work with inverted main/config.
David Roundy <droundy@darcs.net>**20071018170058] 
[sketch of config/main inversion.
David Roundy <droundy@darcs.net>**20071018164230] 
[Operations.hs: make use of notElem and notMember
Eric Mertens <emertens@galois.com>**20071017174357] 
[remove StackOrNot type synonymn.
David Roundy <droundy@darcs.net>**20071017201406] 
[TAG 0.4
Spencer Janssen <sjanssen@cse.unl.edu>**20071016215343] 
Patch bundle hash:
2732a5c59dd0c9be0e4a730d271c1193b442b63a
