aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2014-08-15 07:11:36 +0200
committerAdam Vogt <vogt.adam@gmail.com>2014-08-15 07:11:36 +0200
commit118a57a101c2483f878603cc039d0e26f1b05ef4 (patch)
treeaf5b16e0211bdfc4e56d66b8169004a05ae09e2e
parente1fea474888bd42f46e31cb902e3e1175b38d2dd (diff)
downloadXMonadContrib-118a57a101c2483f878603cc039d0e26f1b05ef4.tar.gz
XMonadContrib-118a57a101c2483f878603cc039d0e26f1b05ef4.tar.xz
XMonadContrib-118a57a101c2483f878603cc039d0e26f1b05ef4.zip
use FiniteBitSize with ghc >
Ignore-this: 90f855fd72406fb3d2640a133d499188 darcs-hash:20140815051136-1499c-ba127cec9ea6d28bdc8372ab4a506ee74f047fa6.gz
-rw-r--r--XMonad/Hooks/DebugEvents.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/XMonad/Hooks/DebugEvents.hs b/XMonad/Hooks/DebugEvents.hs
index 753dc1f..cec777c 100644
--- a/XMonad/Hooks/DebugEvents.hs
+++ b/XMonad/Hooks/DebugEvents.hs
@@ -225,6 +225,12 @@ clientMessages = [("_NET_ACTIVE_WINDOW",("_NET_ACTIVE_WINDOW",32,1))
,("WM_SAVE_YOURSELF" ,("STRING" , 8,0))
]
+#if __GLASGOW_HASKELL__ < 707
+finiteBitSize :: Bits a => a -> Int
+finiteBitSize x = bitSize x
+#endif
+
+
-- | Convert a modifier mask into a useful string
vmask :: KeyMask -> KeyMask -> String
vmask numLockMask msk = unwords $
@@ -232,7 +238,7 @@ vmask numLockMask msk = unwords $
fst $
foldr vmask' ([],msk) masks
where
- masks = map (\m -> (m,show m)) [0..toEnum (bitSize msk - 1)] ++
+ masks = map (\m -> (m,show m)) [0..toEnum (finiteBitSize msk - 1)] ++
[(numLockMask,"num" )
,( lockMask,"lock" )
,(controlMask,"ctrl" )