https://github.com/mejgun/haskell-tdlib
TDLib (Telegram Database library) JSON bindings for Haskell
https://github.com/mejgun/haskell-tdlib
haskell haskell-tdlib tdlib tdlib-haskell telegram telegram-library
Last synced: 6 days ago
JSON representation
TDLib (Telegram Database library) JSON bindings for Haskell
- Host: GitHub
- URL: https://github.com/mejgun/haskell-tdlib
- Owner: mejgun
- License: bsd-3-clause
- Created: 2020-04-20T08:39:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-12-31T11:21:01.000Z (26 days ago)
- Last Synced: 2026-01-04T16:46:18.454Z (21 days ago)
- Topics: haskell, haskell-tdlib, tdlib, tdlib-haskell, telegram, telegram-library
- Language: Haskell
- Homepage: https://haskell-tdlib.netlify.app
- Size: 95.4 MB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# haskell-tdlib
[Telegram library](https://github.com/tdlib/td) haskell bindings. Examples in other languages can be found [here](https://github.com/tdlib/td/tree/master/example)
This lib considers [prebuilt](https://github.com/tdlib/td#building) tdlib dynamic `libtdjson.[so|dylib|dll]` in `lib` folder.
## Use (stack)
Add dependency to stack.yaml file (do not copy this commit hash)
```yaml
extra-deps:
- git: https://github.com/mejgun/haskell-tdlib.git
commit: a4bd75bd7621a2b0873688dbc24cfaf26c1f14ba
```
You may need to specify lib path before running app
* Mac OS: `export DYLD_LIBRARY_PATH=lib`
* Linux: `LD_LIBRARY_PATH=lib`
## Usage example
[queueBot](https://github.com/mejgun/queueBot)
## Docs
* [Online](https://haskell-tdlib.netlify.app)
* Offline - `git clone https://github.com/mejgun/haskell-tdlib-docs`
## Notes
* There are .hs-boot files because of [recursive imports](https://wiki.haskell.org/Mutually_recursive_modules).
* TDLib stored Int64 [as string](https://github.com/tdlib/td/issues/179).
* [Extra](https://haskell-tdlib.netlify.app/td-lib#t:Extra) needed to [match requests with the corresponding responses](https://core.telegram.org/tdlib/getting-started)
Let me know if there is an easier way to make something.
_README and FFI code was partially copied from [Nufeen/tglib-haskell-bindings](https://github.com/Nufeen/tglib-haskell-bindings)_