mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 12:11:52 -07:00
Apply hlint hints
All hints are applied in one single commit, as a commit per hint would result in 80+ separate commits—tihs is really just too much noise. Related: https://github.com/xmonad/xmonad-contrib/issues/537
This commit is contained in:
@@ -13,7 +13,7 @@ import Utils (tags)
|
||||
|
||||
spec :: Spec
|
||||
spec = do
|
||||
prop "prop_unView" $ prop_unView
|
||||
prop "prop_unView" prop_unView
|
||||
|
||||
prop_unView :: T -> Property
|
||||
prop_unView ss = conjoin
|
||||
|
@@ -33,8 +33,7 @@ instance Arbitrary (Selection a) where
|
||||
arbitrary = do
|
||||
nm <- arbNat
|
||||
st <- arbNat
|
||||
nr <- arbPos
|
||||
return $ Sel nm (st + nm) nr
|
||||
Sel nm (st + nm) <$> arbPos
|
||||
|
||||
--
|
||||
-- The all important Arbitrary instance for StackSet.
|
||||
@@ -176,5 +175,5 @@ arbitraryWindow :: NonEmptyWindowsStackSet -> Gen Window
|
||||
arbitraryWindow (NonEmptyWindowsStackSet x) = do
|
||||
let ws = allWindows x
|
||||
-- We know that there are at least 1 window in a NonEmptyWindowsStackSet.
|
||||
idx <- choose (0, (length ws) - 1)
|
||||
idx <- choose (0, length ws - 1)
|
||||
return $ ws !! idx
|
||||
|
@@ -15,35 +15,35 @@ import qualified CycleRecentWS
|
||||
main :: IO ()
|
||||
main = hspec $ do
|
||||
context "ManageDocks" $ do
|
||||
prop "prop_r2c_c2r" $ ManageDocks.prop_r2c_c2r
|
||||
prop "prop_c2r_r2c" $ ManageDocks.prop_c2r_r2c
|
||||
prop "prop_r2c_c2r" ManageDocks.prop_r2c_c2r
|
||||
prop "prop_c2r_r2c" ManageDocks.prop_c2r_r2c
|
||||
context "Selective" $ do
|
||||
prop "prop_select_length" $ Selective.prop_select_length
|
||||
prop "prop_update_idem" $ Selective.prop_update_idem
|
||||
prop "prop_select_master" $ Selective.prop_select_master
|
||||
prop "prop_select_focus" $ Selective.prop_select_focus
|
||||
prop "prop_select_increasing" $ Selective.prop_select_increasing
|
||||
prop "prop_select_two_consec" $ Selective.prop_select_two_consec
|
||||
prop "prop_update_nm" $ Selective.prop_update_nm
|
||||
prop "prop_update_start" $ Selective.prop_update_start
|
||||
prop "prop_update_nr" $ Selective.prop_update_nr
|
||||
prop "prop_update_focus_up" $ Selective.prop_update_focus_up
|
||||
prop "prop_update_focus_down" $ Selective.prop_update_focus_down
|
||||
prop "prop_select_length" Selective.prop_select_length
|
||||
prop "prop_update_idem" Selective.prop_update_idem
|
||||
prop "prop_select_master" Selective.prop_select_master
|
||||
prop "prop_select_focus" Selective.prop_select_focus
|
||||
prop "prop_select_increasing" Selective.prop_select_increasing
|
||||
prop "prop_select_two_consec" Selective.prop_select_two_consec
|
||||
prop "prop_update_nm" Selective.prop_update_nm
|
||||
prop "prop_update_start" Selective.prop_update_start
|
||||
prop "prop_update_nr" Selective.prop_update_nr
|
||||
prop "prop_update_focus_up" Selective.prop_update_focus_up
|
||||
prop "prop_update_focus_down" Selective.prop_update_focus_down
|
||||
context "RotateSome" $ do
|
||||
prop "prop_rotate_some_length" $ RotateSome.prop_rotate_some_length
|
||||
prop "prop_rotate_some_cycle" $ RotateSome.prop_rotate_some_cycle
|
||||
prop "prop_rotate_some_anchors" $ RotateSome.prop_rotate_some_anchors
|
||||
prop "prop_rotate_some_rotate" $ RotateSome.prop_rotate_some_rotate
|
||||
prop "prop_rotate_some_focus" $ RotateSome.prop_rotate_some_focus
|
||||
prop "prop_rotate_some_length" RotateSome.prop_rotate_some_length
|
||||
prop "prop_rotate_some_cycle" RotateSome.prop_rotate_some_cycle
|
||||
prop "prop_rotate_some_anchors" RotateSome.prop_rotate_some_anchors
|
||||
prop "prop_rotate_some_rotate" RotateSome.prop_rotate_some_rotate
|
||||
prop "prop_rotate_some_focus" RotateSome.prop_rotate_some_focus
|
||||
context "SwapWorkspaces" $ do
|
||||
prop "prop_double_swap" $ SwapWorkspaces.prop_double_swap
|
||||
prop "prop_invalid_swap" $ SwapWorkspaces.prop_invalid_swap
|
||||
prop "prop_swap_only_two" $ SwapWorkspaces.prop_swap_only_two
|
||||
prop "prop_swap_with_current" $ SwapWorkspaces.prop_swap_with_current
|
||||
prop "prop_double_swap" SwapWorkspaces.prop_double_swap
|
||||
prop "prop_invalid_swap" SwapWorkspaces.prop_invalid_swap
|
||||
prop "prop_swap_only_two" SwapWorkspaces.prop_swap_only_two
|
||||
prop "prop_swap_with_current" SwapWorkspaces.prop_swap_with_current
|
||||
context "XPrompt" $ do
|
||||
prop "prop_split" $ XPrompt.prop_split
|
||||
prop "prop_spliInSubListsAt" $ XPrompt.prop_spliInSubListsAt
|
||||
prop "prop_skipGetLastWord" $ XPrompt.prop_skipGetLastWord
|
||||
context "NoBorders" $ NoBorders.spec
|
||||
context "ExtensibleConf" $ ExtensibleConf.spec
|
||||
context "CycleRecentWS" $ CycleRecentWS.spec
|
||||
prop "prop_split" XPrompt.prop_split
|
||||
prop "prop_spliInSubListsAt" XPrompt.prop_spliInSubListsAt
|
||||
prop "prop_skipGetLastWord" XPrompt.prop_skipGetLastWord
|
||||
context "NoBorders" NoBorders.spec
|
||||
context "ExtensibleConf" ExtensibleConf.spec
|
||||
context "CycleRecentWS" CycleRecentWS.spec
|
||||
|
@@ -26,7 +26,7 @@ prop_select_master sel (stk :: Stack Int) =
|
||||
take (nMaster sel) (integrate stk) == take (nMaster sel) (integrate $ select sel stk)
|
||||
|
||||
-- the focus should always be selected in normalized selections
|
||||
prop_select_focus sel (stk :: Stack Int) = focus stk == (focus $ select sel' stk)
|
||||
prop_select_focus sel (stk :: Stack Int) = focus stk == focus (select sel' stk)
|
||||
where sel' = update sel stk
|
||||
|
||||
-- select doesn't change order (or duplicate elements)
|
||||
|
@@ -6,8 +6,8 @@ import Graphics.X11.Xlib.Types (Rectangle(..))
|
||||
import Data.List (sortBy)
|
||||
|
||||
-- Useful operation, the non-local workspaces
|
||||
hidden_spaces :: StackSet i l a sid sd -> [Workspace i l a]
|
||||
hidden_spaces x = map workspace (visible x) ++ hidden x
|
||||
hiddenSpaces :: StackSet i l a sid sd -> [Workspace i l a]
|
||||
hiddenSpaces x = map workspace (visible x) ++ hidden x
|
||||
|
||||
|
||||
-- normalise workspace list
|
||||
|
Reference in New Issue
Block a user