aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoachim.fasting <joachim.fasting@gmail.com>2007-06-18 16:45:02 +0200
committerjoachim.fasting <joachim.fasting@gmail.com>2007-06-18 16:45:02 +0200
commitad1bc316d9ce3a7dfd756d779b0203dc0f952286 (patch)
treef8d7d85fade798223ba6ffda7a346b450a8b47a4
parentff0b27c83754d70c2922632201ddf26362999d5e (diff)
downloadXMonadContrib-ad1bc316d9ce3a7dfd756d779b0203dc0f952286.tar.gz
XMonadContrib-ad1bc316d9ce3a7dfd756d779b0203dc0f952286.tar.xz
XMonadContrib-ad1bc316d9ce3a7dfd756d779b0203dc0f952286.zip
RotView.rotView: use Data.Ord.comparing.
Looks a bit cleaner than '\x y -> compare (tag x) (tag y)' darcs-hash:20070618144502-ea16c-ed8b1c8a1e631c03cba39ab98b12ef54f4527c7e.gz
-rw-r--r--RotView.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/RotView.hs b/RotView.hs
index 1ca0b92..38c2cae 100644
--- a/RotView.hs
+++ b/RotView.hs
@@ -21,6 +21,7 @@ module XMonadContrib.RotView (
import Control.Monad.State ( gets )
import Data.List ( sortBy )
import Data.Maybe ( listToMaybe, isJust )
+import Data.Ord ( comparing )
import XMonad
import StackSet hiding (filter)
@@ -38,7 +39,7 @@ rotView :: Bool -> X ()
rotView b = do
ws <- gets windowset
let m = tag . workspace . current $ ws
- sortWs = sortBy (\x y -> compare (tag x) (tag y))
+ sortWs = sortBy (comparing tag)
pivoted = uncurry (flip (++)) . span ((< m) . tag) . sortWs . hidden $ ws
nextws = listToMaybe . filter (isJust . stack) . (if b then id else reverse) $ pivoted
whenJust nextws (O.view . tag)