Browse Source

Add basic README file

Peter J. Jones 5 years ago
1 changed files with 36 additions and 0 deletions
  1. 36

+ 36
- 0 View File

@@ -0,0 +1,36 @@
# Haskell / io-streams Implementation of `wc`

This repository contains an implementation of the POSIX `wc` utility
written in Haskell using the [io-streams] [] library. It was written
to demonstrate the io-streams library for the
[Boulder Haskell Programmers] [bhp] user group.

## The Basics of the io-streams Library

The [io-streams] [] library allows you to write stream processing code
that runs in constant space. It's a streaming library similar to
[Conduit] [] and [Pipes] [] but with significantly fewer features.

Basic features:

* Values are read from an `InputStream`
* `InputStream`s produce a `Maybe a`; `Nothing` means `EOF`
* Values are written to an `OutputStream`
* `OutputStream`s accept a `Maybe a`
* Streams can be files, sockets, vectors, parsers, etc.

## Pros and Cons

* io-streams is great because...
- It's really easy to learn and use
- Stream processing is very fast
- It's easy to compose stream functions together

* io-streams is less desirable because...
- It makes heavy use of the `IO` type
- Limited functionality compared to Conduit and Pipes