From a6e6b47a087907199148b90c59cbdbf3e96bb274 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Tue, 10 Apr 2007 00:35:00 +0200 Subject: Simplify rot darcs-hash:20070409223500-a5988-fa8da8a067b0a923c8709f5656648a5b21241eeb.gz --- XMonad.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'XMonad.hs') diff --git a/XMonad.hs b/XMonad.hs index 38e6370..972169d 100644 --- a/XMonad.hs +++ b/XMonad.hs @@ -50,11 +50,11 @@ data XState = XState type WorkSpace = StackSet Window -- | The different layout modes -data Layout = Full | Tall | Wide deriving (Enum, Bounded) +data Layout = Full | Tall | Wide deriving (Enum, Bounded, Eq) -- | 'rot' for Layout. rot :: Layout -> Layout -rot x = toEnum $ (fromEnum x + 1) `mod` (fromEnum (maxBound `asTypeOf` x) + 1) +rot x = if x == maxBound then minBound else succ x -- | A full description of a particular workspace's layout parameters. data LayoutDesc = LayoutDesc { layoutType :: !Layout -- cgit v1.2.3