From bfa8db9713a99f6086a2af87fe6dd67d2edaacc0 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Fri, 28 Sep 2007 07:31:06 +0200 Subject: LayoutModifier should have descriptions too darcs-hash:20070928053106-a5988-52ef6ad59898865d6d389059e126f210a2f6e4ec.gz --- LayoutModifier.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'LayoutModifier.hs') diff --git a/LayoutModifier.hs b/LayoutModifier.hs index f2dcd32..b518c43 100644 --- a/LayoutModifier.hs +++ b/LayoutModifier.hs @@ -36,6 +36,8 @@ class (Show (m a), Read (m a)) => LayoutModifier m a where hook _ = return () unhook :: m a -> X () unhook _ = return () + modifierDescription :: m a -> String + modifierDescription = show instance (LayoutModifier m a, Layout l a) => Layout (ModifiedLayout m l) a where doLayout (ModifiedLayout m l) r s = @@ -51,5 +53,6 @@ instance (LayoutModifier m a, Layout l a) => Layout (ModifiedLayout m l) a where 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 data ModifiedLayout m l a = ModifiedLayout (m a) (l a) deriving ( Read, Show ) -- cgit v1.2.3