From d7361c1d0c1cbabef97ebde9c571de74ac6227e7 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Thu, 18 Oct 2007 20:30:54 +0200 Subject: change definition of 'description' function for LayoutModifier so an extra space is not added if the modifier description is empty. darcs-hash:20071018183054-bd4d7-0a1a4a2fb97cf789106b0e820b0471ea9f33146a.gz --- LayoutModifier.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'LayoutModifier.hs') diff --git a/LayoutModifier.hs b/LayoutModifier.hs index 1bf276f..ee76306 100644 --- a/LayoutModifier.hs +++ b/LayoutModifier.hs @@ -58,6 +58,8 @@ instance (LayoutModifier m a, LayoutClass l a) => LayoutClass (ModifiedLayout m return $ case mm' of Just m' -> Just $ (ModifiedLayout m') $ maybe l id ml' Nothing -> (ModifiedLayout m) `fmap` ml' - description (ModifiedLayout m l) = modifierDescription m ++ " " ++ description l + description (ModifiedLayout m l) = modDesc ++ sep ++ description l + where modDesc = modifierDescription m + sep = if modDesc == "" then "" else " " data ModifiedLayout m l a = ModifiedLayout (m a) (l a) deriving ( Read, Show ) -- cgit v1.2.3