packages feed

timers 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+22/−1 lines, 2 files

Files

+ src/Control/Concurrent/Timer/Types.hs view
@@ -0,0 +1,18 @@+module Control.Concurrent.Timer.Types+( Timer(..)+) where++------------------------------------------------------------------------------+import           Control.Concurrent         (ThreadId)+import           Control.Concurrent.MVar    (MVar)+import           Control.Concurrent.Suspend (Delay)+------------------------------------------------------------------------------++------------------------------------------------------------------------------+-- | The data type representing the timer.+-- For now, the action and delay are fixed for the lifetime of the Timer.+data Timer m = Timer+    { timerAction   :: m ()+    , timerDelay    :: Delay+    , timerThreadID :: MVar (Maybe ThreadId)+    }
timers.cabal view
@@ -1,5 +1,5 @@ name:                timers-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Simple package that implements timers. description:         Simple package that implements timers. Both "one-shot" and "repeating" timers are implemented. license:             BSD3@@ -20,6 +20,9 @@     exposed-modules:         Control.Concurrent.Timer       , Control.Concurrent.Timer.Lifted++    other-modules:+        Control.Concurrent.Timer.Types      build-depends:         base              == 4.5.*