aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-05-08 18:38:22 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-05-08 18:38:22 +0200
commite93863a0898b4f83ed06b792e3383e2f5ca843bd (patch)
treefa733d33327772ce7b9b4bd2a1b93ac1838e5768
parentf351cc4706ea7bcbace6dbab7dabab67146694ec (diff)
downloadxmonad-e93863a0898b4f83ed06b792e3383e2f5ca843bd.tar.gz
xmonad-e93863a0898b4f83ed06b792e3383e2f5ca843bd.tar.xz
xmonad-e93863a0898b4f83ed06b792e3383e2f5ca843bd.zip
Remove unsafe fromJust
darcs-hash:20070508163822-a5988-cb12015569105b9e646a5c12fc8dc02099a4beed.gz
-rw-r--r--StackSet.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/StackSet.hs b/StackSet.hs
index b7419f1..7607fb3 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -111,7 +111,7 @@ index k w = fmap (uncurry (++)) $ M.lookup k (stacks w)
view :: (Integral i, Integral j) => i -> StackSet i j a -> StackSet i j a
view n w | M.member n (stacks w)
= if M.member n (ws2screen w) then w { current = n }
- else tweak (fromJust $ screen (current w) w)
+ else maybe w tweak (screen (current w) w)
| otherwise = w
where
tweak sc = w { screen2ws = M.insert sc n (screen2ws w)