From 0b80dad888724f0ba8a5cb5bad06bedfc7a69572 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 26 Feb 2011 04:21:44 +0100 Subject: Just some optimizations --- lib/Storage.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Storage.hs b/lib/Storage.hs index 6a8608b..d8fae48 100644 --- a/lib/Storage.hs +++ b/lib/Storage.hs @@ -49,10 +49,14 @@ storage :: (LayoutClass l a, StoreData d) => d -> l a -> ModifiedLayout (Storage storage def = ModifiedLayout $ Storage def +sendMessage' :: Message a => a -> X () +sendMessage' a = W.workspace . W.current <$> gets windowset >>= sendMessageWithNoRefresh a + + getStoreData :: StoreData d => X (Maybe d) getStoreData = do ref <- io . newIORef $ Nothing - broadcastMessage $ GetStoreData ref + sendMessage' $ GetStoreData ref io . readIORef $ ref -- cgit v1.2.3