diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-05-08 18:38:22 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-05-08 18:38:22 +0200 |
commit | e93863a0898b4f83ed06b792e3383e2f5ca843bd (patch) | |
tree | fa733d33327772ce7b9b4bd2a1b93ac1838e5768 | |
parent | f351cc4706ea7bcbace6dbab7dabab67146694ec (diff) | |
download | xmonad-e93863a0898b4f83ed06b792e3383e2f5ca843bd.tar.gz xmonad-e93863a0898b4f83ed06b792e3383e2f5ca843bd.tar.xz xmonad-e93863a0898b4f83ed06b792e3383e2f5ca843bd.zip |
Remove unsafe fromJust
darcs-hash:20070508163822-a5988-cb12015569105b9e646a5c12fc8dc02099a4beed.gz
-rw-r--r-- | StackSet.hs | 2 |
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) |