Skip to content

Using Backpack to abstract over the main Haskell streaming libraries.

License

Notifications You must be signed in to change notification settings

danidiaz/streamy

Repository files navigation

streamy

What's this?

As a learning exercise, I'm trying to use the Backpack module system to give a common interface to the main streaming libraries of Haskell: conduit, pipes, streaming. (Inspired by how str-sig gives a common interface to String-like types.)

Structure of this project

  • streamy-sig is the abstract signature.
  • streamy-bytes-sig expands streamy-sig with a module signature for byte streams.
  • streamy-pipes is the pipes "bridge" package.
  • streamy-streaming
  • streamy-conduit
  • streamy-testsuite test each of the implementations using a shared set of tests.

Do I need all these packages?

Not really, even if you still want to use Backpack to abstract your streaming library.

You can always define a self-contained signature in your own library, and the users of your library can define their own "bridge" implementations to make the types line up.

The advantage of these premade packages is not having to invent your own signatures and bridge modules.

Building instructions

Built using cabal 2.0.

cabal new-build all --enable-tests

cabal new-test streamy-testsuite

Where can I find further information on Backpack?

Edward Z. Yang's thesis is quite readable.

Designing the Backpack signature ecosystem explains the usefulness of signature thinning (see also section 2.7 of the thesis).

Backpack for deep learning.

The str-sig signature package and its various implementations.

I wrote a few Backpack tips & tricks here and here.

About

Using Backpack to abstract over the main Haskell streaming libraries.

Resources

License

Stars

Watchers

Forks

Packages

No packages published