summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/App/EventLoop.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2020-10-09 17:51:07 +0100
committerjao <jao@gnu.org>2020-10-09 17:51:07 +0100
commit407866c433735e510b6bde2d06e2a18cff22c470 (patch)
treef7f73bc4f30f52844f5582c321e97d0375dce1b2 /src/Xmobar/App/EventLoop.hs
parente71512b7c961ab379aee98c2f4d65ad4bdd3c5bf (diff)
downloadxmobar-407866c433735e510b6bde2d06e2a18cff22c470.tar.gz
xmobar-407866c433735e510b6bde2d06e2a18cff22c470.tar.bz2
hlinting
Diffstat (limited to 'src/Xmobar/App/EventLoop.hs')
-rw-r--r--src/Xmobar/App/EventLoop.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Xmobar/App/EventLoop.hs b/src/Xmobar/App/EventLoop.hs
index 1c77ac1..4a0db46 100644
--- a/src/Xmobar/App/EventLoop.hs
+++ b/src/Xmobar/App/EventLoop.hs
@@ -70,7 +70,7 @@ runX :: XConf -> X () -> IO ()
runX xc f = runReaderT f xc
newRefreshLock :: IO (TMVar ())
-newRefreshLock = atomically $ newTMVar ()
+newRefreshLock = newTMVarIO ()
refreshLock :: TMVar () -> IO a -> IO a
refreshLock var = bracket_ lock unlock
@@ -95,7 +95,7 @@ startLoop xcfg@(XConf _ _ w _ _ _ _) sig pauser vs = do
#ifdef XFT
xftInitFtLibrary
#endif
- tv <- atomically $ newTVar []
+ tv <- newTVarIO []
_ <- forkIO (handle (handler "checker") (checker tv [] vs sig pauser))
#ifdef THREADED_RUNTIME
_ <- forkOS (handle (handler "eventer") (eventer sig))
@@ -238,10 +238,10 @@ startCommand :: TMVar SignalType
-> (Runnable,String,String)
-> IO ([Async ()], TVar String)
startCommand sig (com,s,ss)
- | alias com == "" = do var <- atomically $ newTVar is
+ | alias com == "" = do var <- newTVarIO is
atomically $ writeTVar var (s ++ ss)
return ([], var)
- | otherwise = do var <- atomically $ newTVar is
+ | otherwise = do var <- newTVarIO is
let cb str = atomically $ writeTVar var (s ++ str ++ ss)
a1 <- async $ start com cb
a2 <- async $ trigger com $ maybe (return ())