on master help sign in
Conditionally import (<*>)
3ce4822nanonaren
auto-update/Control/AutoUpdate.hs+4
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
1-- | In a multithreaded environment, running actions on a regularly scheduled
2-- | In a multithreaded environment, running actions on a regularly scheduled
2-- background thread can dramatically improve performance.
3-- background thread can dramatically improve performance.
3-- For example, web servers need to return the current time with each HTTP response.
4-- For example, web servers need to return the current time with each HTTP response.
@@ -40,6 +41,9 @@ module Control.AutoUpdate (
40 , mkAutoUpdate
41 , mkAutoUpdate
41 ) where
42 ) where
42
43
44+#if __GLASGOW_HASKELL__ < 709
45+import Control.Applicative ((<*>))
46+#endif
43import Control.Concurrent (forkIO, threadDelay)
47import Control.Concurrent (forkIO, threadDelay)
44import Control.Concurrent.MVar (newEmptyMVar, putMVar, readMVar,
48import Control.Concurrent.MVar (newEmptyMVar, putMVar, readMVar,
45 takeMVar, tryPutMVar)
49 takeMVar, tryPutMVar)