
New patches:

[hide existential Layout (mostly) from user API.
David Roundy <droundy@darcs.net>**20071111003055] 
<
> {
hunk ./XMonad/Config.hs 176
 --
 -- (The comment formatting character is used when generating the manpage)
 --
-keys :: XConfig -> M.Map (KeyMask, KeySym) (X ())
+keys :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ())
 keys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
     -- launching and killing programs
     [ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) -- %! Launch terminal
hunk ./XMonad/Config.hs 237
 
 -- | Mouse bindings: default actions bound to mouse events
 --
-mouseBindings :: XConfig -> M.Map (KeyMask, Button) (Window -> X ())
+mouseBindings :: XConfig Layout -> M.Map (KeyMask, Button) (Window -> X ())
 mouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
     -- mod-button1 %! Set the window to floating mode and move by dragging
     [ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w))
hunk ./XMonad/Config.hs 253
 -- % Extension-provided definitions
 
 -- | And, finally, the default set of configuration values itself
-defaultConfig :: XConfig
 defaultConfig = XConfig
     { XMonad.borderWidth        = borderWidth
     , XMonad.workspaces         = workspaces
hunk ./XMonad/Config.hs 257
     , XMonad.defaultGaps        = defaultGaps
-    , XMonad.layoutHook         = Layout layout
+    , XMonad.layoutHook         = layout
     , XMonad.terminal           = terminal
     , XMonad.normalBorderColor  = normalBorderColor
     , XMonad.focusedBorderColor = focusedBorderColor
hunk ./XMonad/Core.hs 54
 
 data XConf = XConf
     { display       :: Display        -- ^ the X11 display
-    , config        :: !XConfig       -- ^ initial user configuration
+    , config        :: !(XConfig Layout)       -- ^ initial user configuration
     , theRoot       :: !Window        -- ^ the root window
     , normalBorder  :: !Pixel         -- ^ border color of unfocused windows
     , focusedBorder :: !Pixel         -- ^ border color of the focused window
hunk ./XMonad/Core.hs 65
     }
 
 -- todo, better name
-data XConfig = XConfig
+data XConfig l = XConfig
     { normalBorderColor  :: !String
     , focusedBorderColor :: !String
     , terminal           :: !String
hunk ./XMonad/Core.hs 69
-    , layoutHook         :: !(Layout Window)
+    , layoutHook         :: !(l Window)
     , manageHook         :: Window -> X (WindowSet -> WindowSet)
     , workspaces         :: [String]
     , defaultGaps        :: [(Int,Int,Int,Int)]
hunk ./XMonad/Core.hs 75
     , numlockMask        :: !KeyMask
     , modMask            :: !KeyMask
-    , keys               :: XConfig -> M.Map (ButtonMask,KeySym) (X ())
-    , mouseBindings      :: XConfig -> M.Map (ButtonMask, Button) (Window -> X ())
+    , keys               :: XConfig Layout -> M.Map (ButtonMask,KeySym) (X ())
+    , mouseBindings      :: XConfig Layout -> M.Map (ButtonMask, Button) (Window -> X ())
     , borderWidth        :: !Dimension
     , logHook            :: X ()
     }
hunk ./XMonad/Main.hs 41
 -- |
 -- The main entry point
 --
-xmonad :: XConfig -> IO ()
-xmonad xmc = do
+xmonad :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO ()
+xmonad initxmc = do
+    -- First, wrap the layout in an existential, to keep things pretty:
+    let xmc = initxmc { layoutHook = Layout $ layoutHook initxmc }
     dpy   <- openDisplay ""
     let dflt = defaultScreen dpy
 
}

Context:

[we depend on Cabal 1.2.0 or newer
Don Stewart <dons@galois.com>**20071109155934] 
[Generalize several functions to MonadIO
Spencer Janssen <sjanssen@cse.unl.edu>**20071109064214] 
[Docs for ManageHook
Spencer Janssen <sjanssen@cse.unl.edu>**20071109031810] 
[New ManageHook system
Spencer Janssen <sjanssen@cse.unl.edu>**20071109024722] 
[Generalize the type of whenJust
Spencer Janssen <sjanssen@cse.unl.edu>**20071107062126] 
[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:
eb4cba52df3d6b113ef933786fc4c52d7e38e519
