mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-26 09:41:53 -07:00
view n . shift n . view i . shift i) x == x --> shift + view is invertible
This commit is contained in:
@@ -142,10 +142,12 @@ prop_view_idem (x :: T) r =
|
||||
sz = size x
|
||||
in view i (view i x) == (view i x)
|
||||
|
||||
prop_shiftshift r x =
|
||||
let n = current x
|
||||
in shift n (shift r x) == x
|
||||
where _ = x :: T
|
||||
prop_shift_reversible r (x :: T) =
|
||||
let i = fromIntegral $ r `mod` sz
|
||||
sz = size x
|
||||
n = current x
|
||||
in height n x > 0 ==> (view n . shift n . view i . shift i) x == x
|
||||
|
||||
|
||||
prop_fullcache x = cached == allvals where
|
||||
cached = sort . keys $ cache x
|
||||
@@ -323,6 +325,8 @@ main = do
|
||||
,("view/view ", mytest prop_viewview)
|
||||
,("view idem ", mytest prop_view_idem)
|
||||
|
||||
,("shift reversible ", mytest prop_shift_reversible)
|
||||
|
||||
,("fullcache ", mytest prop_fullcache)
|
||||
,("currentwsvisible ", mytest prop_currentwsvisible)
|
||||
,("ws screen mapping", mytest prop_ws2screen_screen2ws)
|
||||
|
Reference in New Issue
Block a user