Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danidiaz/streamy
Using Backpack to abstract over the main Haskell streaming libraries.
https://github.com/danidiaz/streamy
Last synced: 3 months ago
JSON representation
Using Backpack to abstract over the main Haskell streaming libraries.
- Host: GitHub
- URL: https://github.com/danidiaz/streamy
- Owner: danidiaz
- License: mit
- Created: 2017-08-09T17:03:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-16T15:05:03.000Z (about 7 years ago)
- Last Synced: 2024-06-22T09:40:51.424Z (5 months ago)
- Language: Haskell
- Homepage:
- Size: 102 KB
- Stars: 34
- Watchers: 6
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cabal - `streamy`
README
# streamy
## What's this?
As a learning exercise, I'm trying to use the
[Backpack](https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst)
module system to give a common interface to the main streaming libraries of
Haskell: [conduit](http://hackage.haskell.org/package/conduit), [pipes](http://hackage.haskell.org/package/pipes), [streaming](http://hackage.haskell.org/package/streaming). (Inspired by how
[str-sig](http://next.hackage.haskell.org:8080/package/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](https://www.haskell.org/cabal/).
> cabal new-build all --enable-tests
> cabal new-test streamy-testsuite
## Where can I find further information on Backpack?
Edward Z. Yang's [thesis](https://github.com/ezyang/thesis/releases) is quite readable.
[Designing the Backpack signature
ecosystem](http://blog.ezyang.com/2017/03/designing-the-backpack-signature-ecosystem/)
explains the usefulness of signature thinning (see also section 2.7 of the thesis).[Backpack for deep learning](http://blog.ezyang.com/2017/08/backpack-for-deep-learning/).
The [str-sig](http://next.hackage.haskell.org:8080/package/str-sig) signature
package and its various implementations.I wrote a few Backpack tips & tricks
[here](https://medium.com/@danidiaz/backpacking-tips-3adb727bb8f7) and [here](https://medium.com/@danidiaz/backpacking-tips-ii-47fa86e5bf2).