tdlib-0.1.4: complete binding to the Telegram Database Library
Safe HaskellNone
LanguageHaskell2010

TDLib.EventLoop

Description

A heavyweight TDLib effect intepreter written using event loop

Synopsis

effect interpreter

runTDLibEventLoop :: Members '[Embed IO] r => Double -> InChan Update -> Sem (TDLib ': r) a -> Sem r a Source #

runs the TDLib effect

low level functions

runCommand :: (ToJSON a, FromJSON b, FromJSON err) => Client -> Int -> Locks -> Ans -> a -> IO (err b) Source #

runs a command and waits for its answer

loop :: Client -> Double -> Locks -> Ans -> InChan Update -> IO a Source #

runs the event loop that receives updates from the client and dispatches them