packages feed

hzulip 1.1.0.1 → 1.1.0.2

raw patch · 2 files changed

+12/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hzulip.cabal view
@@ -1,5 +1,5 @@ name:                hzulip-version:             1.1.0.1+version:             1.1.0.2 synopsis:            A haskell wrapper for the Zulip API. description:         This a Zulip API wrapper for Haskell. homepage:            https://github.com/yamadapc/hzulip
src/Web/HZulip.hs view
@@ -79,6 +79,7 @@ import Control.Arrow (second) import Control.Lens ((^..)) import Control.Monad (void)+import Control.Monad.Catch (catch, throwM) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Reader (ask, runReaderT) import Data.Aeson (Value(..), decode, encode)@@ -89,8 +90,9 @@ import Data.List (intercalate) import Data.Text as T (Text, unpack) import Data.Text.Encoding as T (encodeUtf8)-import Network.HTTP.Client (Request, applyBasicAuth, httpLbs, method,-                            newManager, parseUrl, responseBody, setQueryString)+import Network.HTTP.Client (Request, HttpException(..), applyBasicAuth, httpLbs,+                            method, newManager, parseUrl, responseBody,+                            setQueryString) import Network.HTTP.Client.MultipartFormData (formDataBody, partBS) import Network.HTTP.Client.TLS (tlsManagerSettings) import Network.HTTP.Types (Method, methodGet, methodPatch, methodPost)@@ -252,9 +254,13 @@     -- We let it fail here, so that failures can be catched and handled by     -- the user     loop q-  where loop q = getEvents q False >>=-                 \(q', evts) -> mapM_ f evts >>-                                loop q'+  where getEvents' q = catch (getEvents q False) (onTimeout q)+        loop q = do+            (q', evts) <- getEvents' q+            mapM_ f evts+            loop q'+        onTimeout q ResponseTimeout = getEvents' q+        onTimeout _ ex = throwM ex  -- | -- Registers a callback to be executed whenever a message comes in. Will