advent-of-code-api 0.2.4.2 → 0.2.5.0
raw patch · 3 files changed
+20/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Advent: runAoC_ :: AoCOpts -> AoC a -> IO a
Files
- CHANGELOG.md +10/−0
- advent-of-code-api.cabal +2/−2
- src/Advent.hs +8/−0
CHANGELOG.md view
@@ -1,6 +1,16 @@ Changelog ========= +Version 0.2.5.0+---------------++*December 2, 2019*++<https://github.com/mstksg/advent-of-code-api/releases/tag/v0.2.5.0>++* Add `runAoC_`, which is `runAoC` but throwing an IO exception instead of+ returning an `Either`.+ Version 0.2.4.2 ---------------
advent-of-code-api.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 00822f3b5bf4103c7c82e15d4dcec35343d1e6a293478fcfdb339c4a7c2ffba1+-- hash: 47b5a0fa5ec3911f9afa108c1f723d2716f225a23091507886305ff551fdca08 name: advent-of-code-api-version: 0.2.4.2+version: 0.2.5.0 synopsis: Advent of Code REST API bindings and servant API description: Haskell bindings for Advent of Code REST API and a servant API. Please use responsibly! See README.md or "Advent" module for an introduction and
src/Advent.hs view
@@ -52,6 +52,7 @@ , AoCOpts(..) , SubmitRes(..), showSubmitRes , runAoC+ , runAoC_ , defaultAoCOpts , AoCError(..) -- ** Calendar@@ -356,6 +357,13 @@ $ runClientM (aocReq _aYear a) =<< aocClientEnv _aSessionKey mcr <- maybe (throwError AoCThrottleError) pure mtr either (throwError . AoCClientError) pure mcr++-- | A version of 'runAoC' that throws an IO exception (of type 'AoCError')+-- upon failure, instead of an 'Either'.+--+-- @since 0.2.5.0+runAoC_ :: AoCOpts -> AoC a -> IO a+runAoC_ o = either throwIO pure <=< runAoC o aocClientEnv :: String -> IO ClientEnv aocClientEnv s = do