[Xmonad] darcs patch: make workspace tag not need to be a Num.

David Roundy droundy at darcs.net
Wed Jun 13 09:44:01 EDT 2007


Hi all,

This is a change that's more pervasive than I'd originally intended.  The
idea is to move away from the dependence on workspace tags being integers
from 0 to size s, so that we can easily have more friendly tags, such as
String.

This also could move us in directions of putting extra information in the
tag.  e.g. if we stored the (Layout, [Layout]) in the tag itself, then we'd
be able to eliminate one additional data structure, and we'd have the
benefit that the pure StackSet code could track our layouts for us.  I'm
not sure this is worthwhile, but the idea came to me, as I was trying to
figure out how you'd recognize which Layout went with which Stack, and
realized that they're tracked totally separately, which seems more than a
little silly.

This seems particularly relevant as dons is talking about creating a Stack
for the float layer (which makes lots of sense to me), and I'll be voting
for allowing custom layouts to the float layer: part of my grand scheme to
make the float layer an equal citizen with other layout systems, but also
useful for people who want tabs on their windows so they can see titles and
drag them around with the use of only one hand.

Anyhow, it's a sort of pervasive change--mostly in terms of the number of
quickcheck tests that required modification because they call new--but I
believe it's basically a simple and safe change also, and amenable to code
review--which is why I didn't change any functionality, except that the
tests no longer assume that workspaces are numbered 0..n-1.

David

Wed Jun 13 06:31:35 PDT 2007  David Roundy <droundy at darcs.net>
  * make workspace tag not need to be a Num.
  This change also removes the barely used 'size' field, and replaces
  it with a tagMember predicate.  The idea is to move towards the ability
  to make the workspace tag be a String, which by default might be "1".."9",
  but could also be customized to be something meaningful to the user.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 26149 bytes
Desc: A darcs patch for your repository!
Url : http://www.haskell.org/pipermail/xmonad/attachments/20070613/6c1f1e9a/attachment-0001.bin


More information about the Xmonad mailing list