mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Fix GHC warnings in tests/
Related: - https://github.com/xmonad/xmonad-contrib/issues/537 - 673f727206b9c066691bc8ed37382aee79017d2e
This commit is contained in:
parent
ea09fc2bf4
commit
410469e124
@ -50,29 +50,29 @@ instance (Integral i, Integral s, Eq a, Arbitrary a, Arbitrary l, Arbitrary sd)
|
|||||||
wsIdxInFocus <- choose (1, numWs) -- pick index of WS to be in focus
|
wsIdxInFocus <- choose (1, numWs) -- pick index of WS to be in focus
|
||||||
|
|
||||||
-- The same screen id's will be present in the list, with high possibility.
|
-- The same screen id's will be present in the list, with high possibility.
|
||||||
screens <- replicateM numScreens arbitrary
|
screenDims <- replicateM numScreens arbitrary
|
||||||
|
|
||||||
-- Generate a list of "windows" for each workspace.
|
-- Generate a list of "windows" for each workspace.
|
||||||
wsWindows <- vector numWs :: Gen [[a]]
|
wsWindows <- vector numWs :: Gen [[a]]
|
||||||
|
|
||||||
-- Pick a random window "number" in each workspace, to give focus.
|
-- Pick a random window "number" in each workspace, to give focus.
|
||||||
focus <- sequence
|
foc <- sequence
|
||||||
[ if null windows
|
[ if null windows
|
||||||
then return Nothing
|
then return Nothing
|
||||||
else Just <$> choose (0, length windows - 1)
|
else Just <$> choose (0, length windows - 1)
|
||||||
| windows <- wsWindows
|
| windows <- wsWindows
|
||||||
]
|
]
|
||||||
|
|
||||||
let tags = [1 .. fromIntegral numWs]
|
let tags' = [1 .. fromIntegral numWs]
|
||||||
focusWsWindows = zip focus wsWindows
|
focusWsWindows = zip foc wsWindows
|
||||||
wss = zip tags focusWsWindows -- tmp representation of a workspace (tag, windows)
|
wss = zip tags' focusWsWindows -- tmp representation of a workspace (tag, windows)
|
||||||
initSs = new lay tags screens
|
initSs = new lay tags' screenDims
|
||||||
return $ view (fromIntegral wsIdxInFocus) $ foldr
|
return $ view (fromIntegral wsIdxInFocus) $ foldr
|
||||||
(\(tag, (focus, windows)) ss -> -- Fold through all generated (tags,windows).
|
(\(tag', (focus', windows)) ss -> -- Fold through all generated (tags,windows).
|
||||||
-- set workspace active by tag and fold through all
|
-- set workspace active by tag and fold through all
|
||||||
-- windows while inserting them. Apply the given number
|
-- windows while inserting them. Apply the given number
|
||||||
-- of `focusUp` on the resulting StackSet.
|
-- of `focusUp` on the resulting StackSet.
|
||||||
applyN focus focusUp $ foldr insertUp (view tag ss) windows
|
applyN focus' focusUp $ foldr insertUp (view tag' ss) windows
|
||||||
)
|
)
|
||||||
initSs
|
initSs
|
||||||
wss
|
wss
|
||||||
|
@ -23,7 +23,7 @@ prop_spliInSubListsAt (x :: Int) (str :: String) =
|
|||||||
x < length str ==> result == take x str
|
x < length str ==> result == take x str
|
||||||
where result = case chunksOf x str of
|
where result = case chunksOf x str of
|
||||||
[] -> []
|
[] -> []
|
||||||
x -> head x
|
y -> head y
|
||||||
|
|
||||||
-- skipLastWord is complementary to getLastWord, unless the only space
|
-- skipLastWord is complementary to getLastWord, unless the only space
|
||||||
-- in the string is the final character, in which case skipLastWord
|
-- in the string is the final character, in which case skipLastWord
|
||||||
|
Loading…
x
Reference in New Issue
Block a user