aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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