summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad.hs')
-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