aboutsummaryrefslogtreecommitdiffstats
path: root/Config.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-04 10:16:49 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-04 10:16:49 +0200
commitba6e32758d41f1117fc125b32008c2f411eec8b1 (patch)
tree5eb85dcf427ef8a924fe45d4feb2a61c24ca156b /Config.hs
parent2a59314ffa3997b6365bf2130ef8df0e0bc0185d (diff)
downloadxmonad-ba6e32758d41f1117fc125b32008c2f411eec8b1.tar.gz
xmonad-ba6e32758d41f1117fc125b32008c2f411eec8b1.tar.xz
xmonad-ba6e32758d41f1117fc125b32008c2f411eec8b1.zip
Constrain layout messages to be members of a Message class
Using Typeables as the only constraint on layout messages is a bit scary, as a user can send arbitrary values to layoutMsg, whether they make sense or not: there's basically no type feedback on the values you supply to layoutMsg. Folloing Simon Marlow's dynamically extensible exceptions paper, we use an existential type, and a Message type class, to constrain valid arguments to layoutMsg to be valid members of Message. That is, a user writes some data type for messages their layout algorithm accepts: data MyLayoutEvent darcs-hash:20070504081649-9c5c1-954b406e8c21c2ca4428960e4fc1f9ffb17fb296.gz
Diffstat (limited to '')
-rw-r--r--Config.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Config.hs b/Config.hs
index 841b3ee..196515d 100644
--- a/Config.hs
+++ b/Config.hs
@@ -154,8 +154,8 @@ keys = M.fromList $
, ((modMask, xK_j ), raise GT)
, ((modMask, xK_k ), raise LT)
- , ((modMask, xK_h ), layoutMsg Shrink)
- , ((modMask, xK_l ), layoutMsg Expand)
+ , ((modMask, xK_h ), sendMessage Shrink)
+ , ((modMask, xK_l ), sendMessage Expand)
, ((modMask .|. shiftMask, xK_c ), kill)