Complete Haskell library for Atproto
Haskell 98%
Elm <1%
CSS <1%
HTML <1%
<1%

README.md

atproto-haskell #

A Haskell atproto library definitely inspired by the canonical typescript implementation

We follow a similar module structure, while maintaining idiomatic Haskell 2010 standards.

This library is designed to be simple to use, with Haskell extensions used sparingly when it makes the library simpler and safer.

An ATProto PDS is currently under construction, but these libraries in their current state should be more than sufficient for any server and CLI tooling.

Bug reports and contributions welcome.

Cool Deviations #

The library is strongly typed and pretty clean in general, but there are a few interesting things I've done differently.

The atproto-haskell-lex library is an almost replica of my avro-simple library (which is based on my Elm avro library) and uses an applicative profunctor to make writing type safe Codecs for atproto types natural and extremely concise. In my opinion it completely subsumes code generation for Lexicon types.

The atproto-haskell-mst library is turning towards effectful Merkle Search Tree Monad transformers. Allowing a lot of code to be simplified and abstracted.

We also have a really cool Zipper for tree traversals and modifications, supporting MST building from different sources in lazy and effectful ways.

Example Apps #

We have 4 examples, for CLIs, reading from the firehose, and tap, as well as a feed generator.

Some AI was Harmed in building of this product #

I personally don't use AI in work contexts, but have found it to be pretty ok at directly porting from one language to another, and parts of this library have indeed been ported with AI tooling from the upstream typescript library.

As such you may submit AI assisted pull requests, but only when you had the idea, and you have read, understand, and checked the code.