packages feed

timers-tick 0.4.0.0 → 0.4.1.0

raw patch · 3 files changed

+19/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Timer.Tick: creaBoolTimerLoop :: Integer -> Timed Bool
+ Control.Timer.Tick: creaTimerLoop :: a -> a -> Integer -> Timed a

Files

changes.txt view
@@ -1,3 +1,9 @@+0.4.1.0+-------++- Added convenience functions `creaTimerLoop` and `creaBoolTimerLoop`.+- Released Tue 28 May 2019 12:45:58 CEST.+ 0.4.0.0 ------- 
src/Control/Timer/Tick.hs view
@@ -18,6 +18,8 @@ module Control.Timer.Tick ( -- * Simple timers                             creaTimer,                             creaBoolTimer,+                            creaTimerLoop,+                            creaBoolTimerLoop,                             -- * Timed resources                             Timed,                             creaTimedRes,@@ -57,6 +59,7 @@ --    -- λ> test timer --    -- a a b c c Fine. -- @+-- data Timed a = TimedRes { -- init                           tSteps    :: [TimerStep a],                           tLoop     :: Loop,@@ -126,11 +129,19 @@ creaTimer :: a -> a -> Integer -> Timed a creaTimer off on i = creaTimedRes (Times 1 Reach) [(i, off), (1, on)] +-- | A looped version of 'creaTimer'.+creaTimerLoop :: a -> a -> Integer -> Timed a+creaTimerLoop off on i = creaTimedRes AlwaysLoop [(i, off), (1, on)]+ -- | Shorthand for: @'creaTimer' False True i@. creaBoolTimer :: Integer -> Timed Bool creaBoolTimer i = creaTimer False True i --- | Most generic way to create a time-based resource (like an animation).+-- | Shorthand for: @'creaTimerLoop' False True i@.+creaBoolTimerLoop :: Integer -> Timed Bool+creaBoolTimerLoop i = creaTimerLoop False True i++-- | Most general way to create a time-based resource (like an animation). -- 'Loop' controls the expiring behaviour, @[(Integer, a)]@ is a list of -- frames and their duration. creaTimedRes :: Loop -> [(Integer, a)] -> Timed a
timers-tick.cabal view
@@ -1,5 +1,5 @@ name:                timers-tick-version:             0.4.0.0+version:             0.4.1.0 synopsis:            tick based timers description:         Tick-based timers and utilities, for games and                      discrete-time programs.