From 2e07689ceadaea1853c1228d14346853223be942 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Sat, 29 Sep 2007 21:12:38 +0200 Subject: some renaming of classes and data types. darcs-hash:20070929191238-72aca-ceb0f2a89b35460e87cf9ff935f786b5a6028fb5.gz --- LayoutModifier.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'LayoutModifier.hs') diff --git a/LayoutModifier.hs b/LayoutModifier.hs index 8c7bd38..59258f9 100644 --- a/LayoutModifier.hs +++ b/LayoutModifier.hs @@ -28,8 +28,8 @@ import Operations ( LayoutMessages(Hide, ReleaseResources) ) -- Use LayoutHelpers to help write easy Layouts. class (Show (m a), Read (m a)) => LayoutModifier m a where - modifyModify :: m a -> SomeMessage -> X (Maybe (m a)) - modifyModify m mess | Just Hide <- fromMessage mess = doUnhook + handleMess :: m a -> SomeMessage -> X (Maybe (m a)) + handleMess m mess | Just Hide <- fromMessage mess = doUnhook | Just ReleaseResources <- fromMessage mess = doUnhook | otherwise = return Nothing where doUnhook = do unhook m; return Nothing @@ -43,7 +43,7 @@ class (Show (m a), Read (m a)) => LayoutModifier m a where modifierDescription :: m a -> String modifierDescription = show -instance (LayoutModifier m a, Layout l a) => Layout (ModifiedLayout m l) a where +instance (LayoutModifier m a, LayoutClass l a) => LayoutClass (ModifiedLayout m l) a where doLayout (ModifiedLayout m l) r s = do (ws, ml') <- doLayout l r s (ws', mm') <- redoLayout m r s ws @@ -53,7 +53,7 @@ instance (LayoutModifier m a, Layout l a) => Layout (ModifiedLayout m l) a where return (ws', ml'') handleMessage (ModifiedLayout m l) mess = do ml' <- handleMessage l mess - mm' <- modifyModify m mess + mm' <- handleMess m mess return $ case mm' of Just m' -> Just $ (ModifiedLayout m') $ maybe l id ml' Nothing -> (ModifiedLayout m) `fmap` ml' -- cgit v1.2.3