From 435244b013cdd0edcddf1ec815d9fe81e1ac4c63 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Tue, 25 Sep 2007 22:28:01 +0200 Subject: fix bug in reading of SomeLayouts. darcs-hash:20070925202801-72aca-476deef33546c9e50ab8b214df29e3330b1839f9.gz --- XMonad.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'XMonad.hs') 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 -- cgit v1.2.3