diff options
author | David Roundy <droundy@darcs.net> | 2007-09-29 21:12:38 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-09-29 21:12:38 +0200 |
commit | 2e07689ceadaea1853c1228d14346853223be942 (patch) | |
tree | 69a6f1aed8bf082fd711a366baf3bf62534d9145 /LayoutModifier.hs | |
parent | 7c1d1059d2626927bbc553f0efccb0b472fa569f (diff) | |
download | XMonadContrib-2e07689ceadaea1853c1228d14346853223be942.tar.gz XMonadContrib-2e07689ceadaea1853c1228d14346853223be942.tar.xz XMonadContrib-2e07689ceadaea1853c1228d14346853223be942.zip |
some renaming of classes and data types.
darcs-hash:20070929191238-72aca-ceb0f2a89b35460e87cf9ff935f786b5a6028fb5.gz
Diffstat (limited to 'LayoutModifier.hs')
-rw-r--r-- | LayoutModifier.hs | 8 |
1 files changed, 4 insertions, 4 deletions
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' |