Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the structure of XMonad.StackSet.Stack type #486

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/XMonad/StackSet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,22 @@ data RationalRect = RationalRect !Rational !Rational !Rational !Rational
-- structures, it is the differentiation of a [a], and integrating it
-- back has a natural implementation used in 'index'.
--
-- Imagine you have a list of windows in this order:
--
-- > 1 2 3 4 <5> 6 7 8 9
--
-- Where @<5>@ is the currently focused window.
-- Then the stack would look like this:
--
-- > Stack { focus = 5
-- > , up = [4, 3, 2, 1]
-- > , down = [6, 7, 8, 9] }
--
-- Note that @up@ is reversed. Both first elements of @up@ and @down@
-- are the closest to the focused window. You can also think of @up@
-- as moving to the /left/ side one-by-one from the focused window.
-- So @down@ is moving to the /right/.
--
data Stack a = Stack { focus :: !a -- focused thing in this set
, up :: [a] -- clowns to the left
, down :: [a] } -- jokers to the right
Expand Down