From 74a8d5a36a08bc054e654cc01b17ea833fd00d7a Mon Sep 17 00:00:00 2001 From: David Roundy Date: Thu, 18 Oct 2007 22:24:38 +0200 Subject: beautify description code for empty modifier-description. darcs-hash:20071018202438-72aca-a9f81255bde7bfa91b531d5240f5e719aaf16e7d.gz --- LayoutModifier.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'LayoutModifier.hs') diff --git a/LayoutModifier.hs b/LayoutModifier.hs index ee76306..22a97c0 100644 --- a/LayoutModifier.hs +++ b/LayoutModifier.hs @@ -58,8 +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) = modDesc ++ sep ++ description l - where modDesc = modifierDescription m - sep = if modDesc == "" then "" else " " + description (ModifiedLayout m l) = modifierDescription m <> description l + where "" <> x = x + x <> y = x ++ " " ++ y data ModifiedLayout m l a = ModifiedLayout (m a) (l a) deriving ( Read, Show ) -- cgit v1.2.3