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 --- Combo.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Combo.hs') diff --git a/Combo.hs b/Combo.hs index 72463d5..f4ab4b0 100644 --- a/Combo.hs +++ b/Combo.hs @@ -50,15 +50,15 @@ import qualified StackSet as W ( differentiate ) -- %import XMonadContrib.Combo -- %layout , combo (twoPane 0.03 0.5) [(full,1),(tabbed shrinkText defaultTConf,1)] -combo :: (Eq a, Show a, Read a, ReadableSomeLayout a, Layout l (SomeLayout a, Int)) - => (l (SomeLayout a, Int)) -> [(SomeLayout a, Int)] -> Combo l a +combo :: (Eq a, Show a, Read a, ReadableLayout a, LayoutClass l (Layout a, Int)) + => (l (Layout a, Int)) -> [(Layout a, Int)] -> Combo l a combo = Combo [] -data Combo l a = Combo [a] (l (SomeLayout a, Int)) [(SomeLayout a, Int)] +data Combo l a = Combo [a] (l (Layout a, Int)) [(Layout a, Int)] deriving ( Show, Read ) -instance (Eq a, Show a, Read a, ReadableSomeLayout a, Layout l (SomeLayout a, Int)) - => Layout (Combo l) a where +instance (Eq a, Show a, Read a, ReadableLayout a, LayoutClass l (Layout a, Int)) + => LayoutClass (Combo l) a where doLayout (Combo f super origls) rinput s = arrange (integrate s) where arrange [] = return ([], Just $ Combo [] super origls) arrange [w] = return ([(w,rinput)], Just $ Combo [w] super origls) @@ -89,7 +89,7 @@ instance (Eq a, Show a, Read a, ReadableSomeLayout a, Layout l (SomeLayout a, In Just [super'] -> return $ Just $ Combo f super' $ maybe origls id mls' _ -> return $ Combo f super `fmap` mls' -broadcastPrivate :: Layout l b => SomeMessage -> [l b] -> X (Maybe [l b]) +broadcastPrivate :: LayoutClass l b => SomeMessage -> [l b] -> X (Maybe [l b]) broadcastPrivate a ol = do nml <- mapM f ol if any isJust nml then return $ Just $ zipWith ((flip maybe) id) ol nml -- cgit v1.2.3