https://github.com/snapframework/io-streams
Simple, composable, and easy-to-use stream I/O for Haskell
https://github.com/snapframework/io-streams
Last synced: 12 months ago
JSON representation
Simple, composable, and easy-to-use stream I/O for Haskell
- Host: GitHub
- URL: https://github.com/snapframework/io-streams
- Owner: snapframework
- License: other
- Created: 2012-11-27T23:58:30.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2025-03-24T15:39:44.000Z (12 months ago)
- Last Synced: 2025-03-29T00:05:42.273Z (12 months ago)
- Language: Haskell
- Size: 671 KB
- Stars: 101
- Watchers: 17
- Forks: 35
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
The io-streams library contains simple and easy to use primitives for I/O
using streams. Based on simple types with one type parameter (`InputStream a`
and `OutputStream a`), io-streams provides a basic interface to
side-effecting input and output in `IO` monad with the following
features:
* three fundamental I/O primitives that anyone can understand: `read ::
InputStream a -> IO (Maybe a)`, `unRead :: a -> InputStream a -> IO ()`,
and `write :: Maybe a -> OutputStream a -> IO ()`.
* simple types and side-effecting IO operations mean straightforward and
simple exception handling and resource cleanup using standard Haskell
facilities like `bracket`.
* code to transform files, handles, and sockets to streams
* a variety of combinators for wrapping and transforming streams, including
compression and decompression using zlib, controlling precisely how many
bytes are read to or written from a socket, buffering output using
`blaze-builder`, etc.
* support for parsing from streams using `attoparsec`.