packages feed

tdlib 0.1.5 → 0.2.0

raw patch · 4 files changed

+24/−22 lines, 4 filesdep ~QuickCheckdep ~base64-bytestring-typedep ~quickcheck-text

Dependency ranges changed: QuickCheck, base64-bytestring-type, quickcheck-text, tdlib-types

Files

CHANGELOG.md view
@@ -12,3 +12,6 @@  * Handle null pointers +## 0.2.0++* Update the dependency tdlib-types to 0.2.0
src/TDLib/EventLoop.hs view
@@ -26,9 +26,8 @@ import Polysemy import TDLib.Effect import TDLib.Errors-import TDLib.Generated.Types hiding (Error (..))+import TDLib.Generated.Types hiding (Error (..), error) import TDLib.TDJson-import TDLib.Types.Common hiding (Error)  type Ans = TVar (IntMap Value) @@ -106,7 +105,7 @@         Just i -> atomically $ insertAns i lck ans v  -- | runs a command and waits for its answer-runCommand :: (ToJSON a, FromJSON b, FromJSON err) => Client -> Int -> Locks -> Ans -> a -> IO (err ∪ b)+runCommand :: (ToJSON cmd, FromJSON res) => Client -> Int -> Locks -> Ans -> cmd -> IO res runCommand client i lck ans cmd =   case toJSON cmd of     Object hm -> do
tdlib.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: d287bd2284586f7f41e71152629ccc38f4bf2443d1ad489bcca5499b9b6c9a5f+-- hash: 4ccf45088eb19ab7965b8244cc769024a1e27467bf2778658af51c1de63c67c4  name:               tdlib-version:            0.1.5+version:            0.2.0 license:            BSD3 license-file:       LICENSE copyright:          (c) 2020 Poscat@@ -45,14 +45,14 @@         aeson >=1.4.7 && <1.6,         base >=4.10 && <5,         bytestring,-        containers >=1.6.2.1 && <1.7,+        containers >=0.6.2.1 && <0.7,         monad-loops,         polysemy >=1.3.0.0 && <1.4,         polysemy-plugin >=0.2.5.0 && <0.3,         stm >=2.5.0.0 && <2.6,-        tdlib-types >=0.1.0 && <0.2,+        tdlib-types >=0.3.0 && <0.4,         text,-        unagi-chan >=0.2.5.0 && <0.3,+        unagi-chan >=0.4.1.3 && <0.5,         unordered-containers >=0.2.10.0 && <0.3  test-suite tdlib-test@@ -68,19 +68,19 @@         tdjson     ghc-options: -fplugin=Polysemy.Plugin -flate-specialise -fspecialise-aggressively -threaded -rtsopts -with-rtsopts=-N     build-depends:-        QuickCheck >=2.14 && <2.15,+        QuickCheck,         aeson >=1.4.7 && <1.6,         base >=4.10 && <5,-        base64-bytestring-type >=1.0.1 && <1.1,+        base64-bytestring-type,         bytestring,-        containers >=1.6.2.1 && <1.7,+        containers >=0.6.2.1 && <0.7,         monad-loops,         polysemy >=1.3.0.0 && <1.4,         polysemy-plugin >=0.2.5.0 && <0.3,-        quickcheck-text >=0.1.2.1 && <0.2,+        quickcheck-text,         stm >=2.5.0.0 && <2.6,         tdlib,-        tdlib-types >=0.1.0 && <0.2,+        tdlib-types >=0.3.0 && <0.4,         text,-        unagi-chan >=0.2.5.0 && <0.3,+        unagi-chan >=0.4.1.3 && <0.5,         unordered-containers >=0.2.10.0 && <0.3
test/Spec.hs view
@@ -56,43 +56,43 @@  squareInt :: InChan Update -> I32 -> Property squareInt ichan i = mm ichan $ do-  r <- run $ testSquareInt (TestSquareInt i)+  r <- run $ testSquareInt i   assert $ Inr (TestInt $ (i :: Int) ^ (2 :: Int)) == r  callEmpty :: InChan Update -> Property callEmpty ichan = mm ichan $ do-  ok <- run $ testCallEmpty TestCallEmpty+  ok <- run $ testCallEmpty   assert $ Inr Ok == ok  callString :: InChan Update -> Text -> Property callString ichan t = mm ichan $ do-  r <- run $ testCallString (TestCallString t)+  r <- run $ testCallString t   assert $ Inr (TestString t) == r  callVecInt :: InChan Update -> [I32] -> Property callVecInt ichan vec = mm ichan $ do-  r <- run $ testCallVectorInt (TestCallVectorInt vec)+  r <- run $ testCallVectorInt vec   assert $ Inr (TestVectorInt vec) == r  callVecIntObject :: InChan Update -> [I32] -> Property callVecIntObject ichan vec = mm ichan $ do   let v' = fmap TestInt vec-  r <- run $ testCallVectorIntObject (TestCallVectorIntObject v')+  r <- run $ testCallVectorIntObject v'   assert $ Inr (TestVectorIntObject v') == r  callVecString :: InChan Update -> [Text] -> Property callVecString ichan vec = mm ichan $ do-  r <- run $ testCallVectorString (TestCallVectorString vec)+  r <- run $ testCallVectorString vec   assert $ Inr (TestVectorString vec) == r  callVecStringObject :: InChan Update -> [Text] -> Property callVecStringObject ichan vec = mm ichan $ do   let v' = fmap TestString vec-  r <- run $ testCallVectorStringObject (TestCallVectorStringObject v')+  r <- run $ testCallVectorStringObject v'   assert $ Inr (TestVectorStringObject v') == r  callBytes :: InChan Update -> ByteString -> Property callBytes ichan bs = mm ichan $ do   let bs' = makeByteString64 bs-  r <- run $ testCallBytes (TestCallBytes bs')+  r <- run $ testCallBytes bs'   assert $ Inr (TestBytes bs') == r