This library allows an Attoparsec parser to receive input incrementally from an enumerator. This could be used for parsing large files, or implementing binary network protocols.
> (-# LANGUAGE OverloadedStrings #-)
> import Control.Applicative
> import Data.Attoparsec
> import Data.Attoparsec.Enumerator
> import Data.Enumerator
> import Data.Enumerator.Binary (enumHandle)
> import Data.Enumerator.List
> import System.IO
> parser = string "foo" <|> string "bar"
> main = do
> xy <- run_ (enumHandle 1 stdin $$ do
> x <- iterParser parser
> y <- iterParser parser
> return (x, y))
> print xy
This package has been deprecated. You recommend that you use either attoparsec-enumerator or attoparsec-conduit packages.
This package integrates the builders from the blaze-builder package with the enumerator package. It provides infrastructure and enumeratees for incrementally executing builders and pass the filled chunks to a bytestring iteratee.
This package acts as a bidirectional bridge between two monad transformers: the Data.Enumerator.Iteratee in the enumerator package, and the Control.Monad.Coroutine.Coroutine in the monad-coroutine package.
This package is a thin wrapper around http-enumerator to access a Couch DB Database, using the aeson package to parse and encode JSON data. http-enumerator, aeson, and attoparsec fit togther so well that this package is mostly just a direct combination of these packages. The single additional feature in this package is an attoparsec parser for views, which allows constant memory processing of view returns. This package is deprecated by http://hackage.haskell.org/package/couchdb-conduit
CSV files are the de-facto standard in many situations involving data transfer, particularly when dealing with enterprise application or disparate database systems.
While there are a number of CSV libraries in Haskell, at the time of this project's start in 2010, there wasn't one that provided all of the following:
* Full flexibility in quote characters, separators, input/output
* Constant space operation
* Robust parsing, correctness and error resiliency
* Convenient interface that supports a variety of use cases
* Fast operation
This library is an attempt to close these gaps.
For more documentation and examples, check out the README at:
The API is fairly well documented and I would encourage you to keep your haddocks handy. If you run into problems, just email me or holler over at #haskell.
Typical buffer–based incremental I/O is based around a single loop, which reads data from some source (such as a socket or file), transforms it, and generates one or more outputs (such as a line count, HTTP responses, or modified file). Although efficient and safe, these loops are all single–purpose; it is difficult or impossible to compose buffer–based processing loops.
Haskell’s concept of “lazy IO” allows pure code to operate on data from an external source. However, lazy IO has several shortcomings. Most notably, resources such as memory and file handles can be retained for arbitrarily long periods of time, causing unpredictable performance and error conditions.
Enumerators are an efficient, predictable, and safe alternative to lazy IO. Discovered by Oleg Kiselyov, they allow large datasets to be processed in near–constant space by pure code. Although somewhat more complex to write, using enumerators instead of lazy IO produces more correct programs.
This library contains an enumerator implementation for Haskell, designed to be both simple and efficient. Three core types are defined, along with numerous helper functions:
* Iteratee: Data sinks, analogous to left folds. Iteratees consume a sequence of input values, and generate a single output value. Many iteratees are designed to perform side effects (such as printing to stdout), so they can also be used as monad transformers.
* Enumerator: Data sources, which generate input sequences. Typical enumerators read from a file handle, socket, random number generator, or other external stream. To operate, enumerators are passed an iteratee, and provide that iteratee with input until either the iteratee has completed its computation, or EOF.
* Enumeratee: Data transformers, which operate as both enumerators and iteratees. Enumeratees read from an outer enumerator, and provide the transformed data to an inner iteratee.
This package has been deprecated in favor of http-conduit (http://hackage.haskell.org/package/http-conduit), which provides a more powerful and simpler interface. The API is very similar, and migrating should not be problematic. Send concerns about this move to the maintainer (address listed above).
Provides the ability to render JSON in a streaming manner using the enumerator package.
High level bindings to xz-utils.
Netstrings are a simple way to encode arbitrary binary data, so it can be decoded without requiring sentinel bytes.
pcap enumerator package
Show more results