simplify code in StackSet.

This commit is contained in:
David Roundy
2007-08-14 01:04:22 +00:00
parent ec0995a3a6
commit df4c18a181

View File

@@ -226,7 +226,7 @@ new _ _ = abort "non-positive argument to StackSet.new"
view :: (Eq a, Eq s, Eq i) => i -> StackSet i a s sd -> StackSet i a s sd
view i s
| not (elem i $ map tag $ workspaces s)
| not (i `tagMember` s)
|| i == tag (workspace (current s)) = s -- out of bounds or current
| Just x <- L.find ((i==).tag.workspace) (visible s)