aboutsummaryrefslogtreecommitdiffstats
path: root/Config.hs-boot
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-20 09:00:53 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-20 09:00:53 +0200
commitabec4b5b485300b9af756ae4fc8036be8aac2be2 (patch)
tree717dc51c42ca4f997bce5009624991c68a5a04f7 /Config.hs-boot
parentfa6c92d575ea4d918af50669b5d9ba79a3cd5ed9 (diff)
downloadxmonad-abec4b5b485300b9af756ae4fc8036be8aac2be2.tar.gz
xmonad-abec4b5b485300b9af756ae4fc8036be8aac2be2.tar.xz
xmonad-abec4b5b485300b9af756ae4fc8036be8aac2be2.zip
HEADS UP: Rewrite StackSet as a Zipper
In order to give a better account of how focus and master interact, and how each operation affects focus, we reimplement the StackSet type as a two level nested 'Zipper'. To quote Oleg: A Zipper is essentially an `updateable' and yet pure functional cursor into a data structure. Zipper is also a delimited continuation reified as a data structure. That is, we use the Zipper as a cursor which encodes the window which is in focus. Thus our data structure tracks focus correctly by construction! We then get simple, obvious semantics for e.g. insert, in terms of how it affects focus/master. Our transient-messes-with-focus bug evaporates. 'swap' becomes trivial. By moving focus directly into the stackset, we can toss some QC properties about focus handling: it is simply impossible now for focus to go wrong. As a benefit, we get a dozen new QC properties for free, governing how master and focus operate. The encoding of focus in the data type also simplifies the focus handling in Operations: several operations affecting focus are now simply wrappers over StackSet. For the full story, please read the StackSet module, and the QC properties. Finally, we save ~40 lines with the simplified logic in Operations.hs For more info, see the blog post on the implementation, http://cgi.cse.unsw.edu.au/~dons/blog/2007/05/17#xmonad_part1b_zipper darcs-hash:20070520070053-9c5c1-241f7ee7793f5db2b9e33d375965cdc21b26cbd7.gz
Diffstat (limited to 'Config.hs-boot')
-rw-r--r--Config.hs-boot2
1 files changed, 0 insertions, 2 deletions
diff --git a/Config.hs-boot b/Config.hs-boot
index 5a03488..2d66ae1 100644
--- a/Config.hs-boot
+++ b/Config.hs-boot
@@ -1,5 +1,3 @@
module Config where
-import XMonad (Layout)
import Graphics.X11.Xlib.Types (Dimension)
-defaultLayouts :: [Layout]
borderWidth :: Dimension