Fix GHC warning: -Wtype-defaults

Related: https://github.com/xmonad/xmonad-contrib/issues/537
This commit is contained in:
slotThe 2021-05-20 16:52:58 +02:00
parent 6b014e6025
commit 25ad725e0c
4 changed files with 5 additions and 5 deletions

View File

@ -86,7 +86,7 @@ columnLayout (BinaryColumn scale min_size) rect stack = zip ws rects
m_fl = fromIntegral m
m_prev_fl = fromIntegral (m + 1)
div_test = min divide m_prev_fl
value_test = (toInteger (round ((fromIntegral size) / div_test)))
value_test = round ((fromIntegral size) / div_test) :: Integer
value_max = size - toInteger (min_size * m)
(value, divide_next, no_room) =
if value_test < value_max then
@ -102,7 +102,7 @@ columnLayout (BinaryColumn scale min_size) rect stack = zip ws rects
f m size divide True = let
divide_next = fromIntegral m
value_even = ((fromIntegral size) / divide)
value = (toInteger (round value_even))
value = round value_even :: Integer
m_next = m - 1
size_next = size - value

View File

@ -223,7 +223,7 @@ instance Eq a => DecorationStyle TabbedDecoration a where
nx = n x wh
upperTab = Rectangle nx y wid (fi ht)
lowerTab = Rectangle nx (y + fi (hh - ht)) wid (fi ht)
fixHeightLoc i = y + fi (((fi ht) * fi i))
fixHeightLoc i = y + fi ht * fi i
fixHeightTab k = Rectangle k
(maybe y (fixHeightLoc)
$ w `elemIndex` ws) (fi wt) (fi ht)

View File

@ -469,7 +469,7 @@ instance (GetFocused l a, GetFocused r a) => LayoutClass (ChooseWrapper l r) a w
L -> do
ml <- handle l NextNoWrap
case ml of
Just l0 -> return (L,l0,r,0)
Just l0 -> return (L, l0, r, 0 :: Integer)
Nothing -> do
mr <- handle r FirstLayout
case mr of

View File

@ -91,7 +91,7 @@ nspTrackHook _ (DestroyWindowEvent {ev_window = w}) = do
return (All True)
nspTrackHook ns (ConfigureRequestEvent {ev_window = w}) = do
NSPTrack ws <- XS.get
ws' <- forM (zip3 [0..] ws ns) $ \(_,w',NS _ _ q _) -> do
ws' <- forM (zip3 [0 :: Integer ..] ws ns) $ \(_,w',NS _ _ q _) -> do
p <- runQuery q w
return $ if p then Just w else w'
XS.put $ NSPTrack ws'