aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorDaniel Wagner <daniel@wagner-home.com>2011-11-15 03:26:50 +0100
committerDaniel Wagner <daniel@wagner-home.com>2011-11-15 03:26:50 +0100
commit84323448ca9526b91181d361efaa506c67f9813e (patch)
tree1f77cd7b576176ffc869cba90fafad06fde9376d /XMonad
parent361e727a7844e5fd2ea7eaa0d6b1d4fc0a5c0b68 (diff)
downloadXMonadContrib-84323448ca9526b91181d361efaa506c67f9813e.tar.gz
XMonadContrib-84323448ca9526b91181d361efaa506c67f9813e.tar.xz
XMonadContrib-84323448ca9526b91181d361efaa506c67f9813e.zip
get ready for GHC 7.4: Num a no longer implies (Eq a, Show a)
Ignore-this: faa34d69ddd27b98c6507740b42c9e97 darcs-hash:20111115022650-76d51-10a2e23210b65268ffa3aa606ebba72b6986e77e.gz
Diffstat (limited to '')
-rw-r--r--XMonad/Actions/GridSelect.hs4
-rw-r--r--XMonad/Hooks/DebugKeyEvents.hs2
-rw-r--r--XMonad/Layout/MouseResizableTile.hs2
3 files changed, 4 insertions, 4 deletions
diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs
index 66aa952..afc37ae 100644
--- a/XMonad/Actions/GridSelect.hs
+++ b/XMonad/Actions/GridSelect.hs
@@ -251,7 +251,7 @@ liftX = TwoD . lift
evalTwoD :: TwoD a1 a -> TwoDState a1 -> X a
evalTwoD m s = flip evalStateT s $ unTwoD m
-diamondLayer :: (Enum b', Num b') => b' -> [(b', b')]
+diamondLayer :: (Enum a, Num a, Eq a) => a -> [(a, a)]
diamondLayer 0 = [(0,0)]
diamondLayer n =
-- tr = top right
@@ -260,7 +260,7 @@ diamondLayer n =
r = tr ++ (map (\(x,y) -> (y,-x)) tr)
in r ++ (map (negate *** negate) r)
-diamond :: (Enum a, Num a) => [(a, a)]
+diamond :: (Enum a, Num a, Eq a) => [(a, a)]
diamond = concatMap diamondLayer [0..]
diamondRestrict :: Integer -> Integer -> Integer -> Integer -> [(Integer, Integer)]
diff --git a/XMonad/Hooks/DebugKeyEvents.hs b/XMonad/Hooks/DebugKeyEvents.hs
index edacb6c..af8184c 100644
--- a/XMonad/Hooks/DebugKeyEvents.hs
+++ b/XMonad/Hooks/DebugKeyEvents.hs
@@ -81,7 +81,7 @@ debugKeyEvents (KeyEvent {ev_event_type = t, ev_state = m, ev_keycode = code})
debugKeyEvents _ = return (All True)
-- | Convenient showHex variant
-hex :: Integral n => n -> String
+hex :: (Integral n, Show n) => n -> String
hex v = "0x" ++ showHex v ""
-- | Convert a modifier mask into a useful string
diff --git a/XMonad/Layout/MouseResizableTile.hs b/XMonad/Layout/MouseResizableTile.hs
index 4645652..a9bc36b 100644
--- a/XMonad/Layout/MouseResizableTile.hs
+++ b/XMonad/Layout/MouseResizableTile.hs
@@ -225,7 +225,7 @@ modifySlave state delta =
(max 0 (min 1 (oldFraction + delta))) }
else state
-replaceAtPos :: (Num t) => Rational -> [Rational] -> t -> Rational -> [Rational]
+replaceAtPos :: (Num t, Eq t) => Rational -> [Rational] -> t -> Rational -> [Rational]
replaceAtPos _ [] 0 x' = [x']
replaceAtPos d [] pos x' = d : replaceAtPos d [] (pos - 1) x'
replaceAtPos _ (_:xs) 0 x' = x' : xs