Skip to content

Commit

Permalink
Fix GHC warning: -Wtype-defaults
Browse files Browse the repository at this point in the history
Related: xmonad#537
  • Loading branch information
slotThe committed May 20, 2021
1 parent 6b014e6 commit 25ad725
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions XMonad/Layout/BinaryColumn.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion XMonad/Layout/Tabbed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion XMonad/Layout/TallMastersCombo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion XMonad/Util/Loggers/NamedScratchpad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 25ad725

Please sign in to comment.