summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-09-25 22:28:01 +0200
committerDavid Roundy <droundy@darcs.net>2007-09-25 22:28:01 +0200
commitf156bd3f2b4fbd9d4153245a6fd148af57929f06 (patch)
tree72c4d04fbfb037c861309f44a95e302258c3dca9
parentf9f72b911aa645fd9510dc541bb681da6153194f (diff)
downloadmetatile-f156bd3f2b4fbd9d4153245a6fd148af57929f06.tar
metatile-f156bd3f2b4fbd9d4153245a6fd148af57929f06.zip
fix bug in reading of SomeLayouts.
darcs-hash:20070925202801-72aca-476deef33546c9e50ab8b214df29e3330b1839f9
-rw-r--r--XMonad.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/XMonad.hs b/XMonad.hs
index ebaa2ca..0d66d25 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -144,7 +144,9 @@ instance Show (SomeLayout a) where
show (SomeLayout l) = show l
readLayout :: [SomeLayout a] -> String -> [(SomeLayout a, String)]
-readLayout ls s = concatMap rl ls
+readLayout ls s = case concatMap rl ls of
+ (x:_) -> [x]
+ [] -> []
where rl (SomeLayout x) = map (\(l,s') -> (SomeLayout l,s')) $ rl' x
rl' :: Layout l a => l a -> [(l a,String)]
rl' _ = reads s