
On Tue, Jan 29, 2008 at 09:11:49PM +0100, Andrea Rossato wrote:
I've also pushed the LayoutCombinator class. This is will make LayoytModifier(s) and LayoutCombinator(s) implementations totally independent from the Layout implementation.
I'll write more extensively on that at a later time, also because I've already said quite a lot in previous messages.
just to give you the taste. this is the new impementation of the simple Toggle I gave you before: data ToggleLay a = TL Bool deriving (Read,Show) instance LayoutCombinator ToggleLay a where pureChooser (TL b) = if b then DoFirst else DoSecond pureComboHandleMess (TL b) _ _ m | Just Togg <- fromMessage m = TL (not b) | otherwise = TL b data TLay = Togg deriving (Read,Show,Typeable) instance Message TLay toggle :: l1 a -> l2 a -> CombinedLayout ToggleLay l1 l2 a toggle = CombinedLayout (TL True) Don? Did you see? there are always pure methods in EVERY class!! cheers, andrea