packages feed

nationstates 0.3.0.0 → 0.3.0.1

raw patch · 2 files changed

+6/−8 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

NationStates/RateLimit.hs view
@@ -38,13 +38,11 @@ -- | Run the given action, pausing as necessary to keep under the rate limit. rateLimit :: RateLimit -> IO a -> IO a rateLimit RateLimit { rateLock = lock, rateDelay = delay } action =-    bracketOnError-        (takeMVar lock)-        (tryPutMVar lock)-        (\prev -> do-            now <- getTime Monotonic-            threadDelay' $ prev + delay - now-            action `finally` (putMVar lock =<< getTime Monotonic))+    mask $ \restore -> do+        prev <- takeMVar lock+        now <- getTime Monotonic+        threadDelay' (prev + delay - now) `onException` putMVar lock prev+        restore action `finally` (putMVar lock =<< getTime Monotonic)   threadDelay' :: TimeSpec -> IO ()
nationstates.cabal view
@@ -1,5 +1,5 @@ name: nationstates-version: 0.3.0.0+version: 0.3.0.1 synopsis: NationStates API client description:     NationStates API client