Stream

module Network.HTTP.Stream
HTTP Network.HTTP.Stream
Transmitting HTTP requests and responses holding String in their payload bodies. This is one of the implementation modules for the Network.HTTP interface, representing request and response content as Strings and transmitting them in non-packed form (cf. Network.HTTP.HandleStream and its use of ByteStrings.) over Stream handles. It is mostly here for backwards compatibility, representing how requests and responses were transmitted up until the 4.x releases of the HTTP package. For more detailed information about what the individual exports do, please consult the documentation for Network.HTTP. Notice however that the functions here do not perform any kind of normalization prior to transmission (or receipt); you are responsible for doing any such yourself, or, if you prefer, just switch to using Network.HTTP function instead.
module Network.Stream
HTTP Network.Stream
An library for creating abstract streams. Originally part of Gray's\/Bringert's HTTP module. * Changes by Robin Bate Boerop robin@bateboerop.name: - Removed unnecessary import statements. - Moved Debug code to StreamDebugger.hs - Moved Socket-related code to StreamSocket.hs. * Changes by Simon Foster: - Split Network.HTTPmodule up into to separate Network.[Stream,TCP,HTTP] modules
Stream :: IODeviceType
base GHC.IO.Device
A duplex communications channel (results in creation of a duplex GHC.IO.Handle.Handle). The standard libraries use this device type when creating GHC.IO.Handle.Handles for open sockets.
Stream :: SocketType
network Network.Socket
SOCK_STREAM
class Stream x
HTTP Network.Stream
Streams should make layering of TLS protocol easier in future, they allow reading/writing to files etc for debugging, they allow use of protocols other than TCP/IP and they allow customisation. Instances of this class should not trim the input in any way, e.g. leave LF on line endings etc. Unless that is exactly the behaviour you want from your twisted instances ;)
class Monad m => Stream s m t | s -> t
parsec Text.Parsec.Prim
An instance of Stream has stream type s, underlying monad m and token type t determined by the stream Some rough guidelines for a "correct" instance of Stream: * unfoldM uncons gives the [t] corresponding to the stream * A Stream instance is responsible for maintaining the "position within the stream" in the stream state s. This is trivial unless you are using the monad in a non-trivial way.
package Stream
package
This package implements functions, analogous to those from Data.List, to create and manipulate infinite lists: data Stream a = Cons a (Stream a). It provides alternative definitions for those Prelude functions that make sense for such streams. Note that this package has (almost) nothing to do with the work on Stream Fusion by Duncan Coutts, Roman Leshchinskiy, and Don Stewart. Version 0.4.6.1
module Network.StreamDebugger
HTTP Network.StreamDebugger
Implements debugging of Streams. Originally part of Gray's\/Bringert's HTTP module. * Changes by Robin Bate Boerop robin@bateboerop.name: - Created. Made minor formatting changes.
module Network.StreamSocket
HTTP Network.StreamSocket
Socket Stream instance. Originally part of Gray's\/Bringert's HTTP module. * Changes by Robin Bate Boerop robin@bateboerop.name: - Made dependencies explicit in import statements. - Removed false dependencies in import statements. - Created separate module for instance Stream Socket. * Changes by Simon Foster: - Split module up into to sepearate Network.[Stream,TCP,HTTP] modules
StreamChunk :: ByteString -> DecompressStream -> DecompressStream
zlib Codec.Compression.Zlib.Internal
StreamCopy :: BufferUsage
OpenGL Graphics.Rendering.OpenGL.GL.BufferObjects
data StreamDebugger x
HTTP Network.StreamDebugger
Allows stream logging. Refer to debugStream below.
StreamDraw :: BufferUsage
OpenGL Graphics.Rendering.OpenGL.GL.BufferObjects
StreamEnd :: DecompressStream
zlib Codec.Compression.Zlib.Internal
StreamError :: DecompressError -> String -> DecompressStream
zlib Codec.Compression.Zlib.Internal
An error code and a human readable error message.
StreamHooks :: ((ty -> String) -> Result ty -> IO ()) -> ((ty -> String) -> Int -> Result ty -> IO ()) -> ((ty -> String) -> ty -> Result () -> IO ()) -> IO () -> String -> StreamHooks ty
HTTP Network.TCP
data StreamHooks ty
HTTP Network.TCP
data StreamPermParser s st a
parsec Text.Parsec.Perm
The type StreamPermParser s st a denotes a permutation parser that, when converted by the permute function, parses s streams with user state st and returns a value of type a on success. Normally, a permutation parser is first build with special operators like (<||>) and than transformed into a normal parser using permute.
StreamRead :: BufferUsage
OpenGL Graphics.Rendering.OpenGL.GL.BufferObjects
package stream-fusion
package
This package provides the standard Haskell list library reimplemented to allow stream fusion. This should in general provide faster list operations, and faster code for list-heavy programs.  See the paper Stream Fusion: From Lists to Streams to Nothing at All, Coutts, Leshchinskiy and Stewart, 2007. To use, simply import Data.List.Stream in place of Data.List, and hide list functions from the Prelude. Version 0.1.2.5
package stream-monad
package
This Haskell library provides an implementation of the MonadPlus type class that enumerates results of a non-deterministic computation by interleaving subcomputations in a way that has usually much better memory performance than other strategies with the same termination properties. Version 0.4.0.2
package streamed
package
Please note: This package shall be replaced by reactive-balsa in the future. MIDI is the Musical Instrument Digital Interface, ALSA is the Advanced Linux Sound Architecture. This package allows to manipulate a sequence of MIDI events via ALSA. It is intended to be plugged as a playing assistant between a MIDI input device (e.g. a keyboard or a controller bank) and a MIDI controlled synthesizer (e.g. a software synthesizer or an external synthesizer). For software synthesizers see the Haskell packages synthesizer-alsa, synthesizer-llvm, supercollider-midi, hsc3, YampaSynth or the C packages fluidsynth and Timidity. Applications include: Remapping of channels, controller, instruments, keys, Keyboard splitting, Conversion from notes to controllers, Latch mode, Convert parallel chords to serial patterns, Automated change of MIDI controllers, Echo simulation. It is intended that you write programs for MIDI stream manipulation. It is not intended to provide an executable program with all the functionality available in a custom programming interface. It is most fun to play with the stream editors in GHCi. However we provide an example module that demonstrates various effects. Version 0.2
package streamproc
package
A continuation-based stream processor implemented as an Arrow. This version generalizes the SP type described in John Hughes &quot;Generalising Monads to Arrows&quot; to function as a wrapper for arbitrary monads. Version 1.6.2
package streams
package
Various Haskell 2010 stream comonads. * Data.Stream.Future provides a coinductive anti-causal stream, or non-empty ZipList. The comonad provides access to only the tail of the stream. Like a conventional ZipList, this is not a monad. > data Future a = Last a | a :< Future a * Data.Stream.Future.Skew provides a non-empty skew-binary random-access-list with the semantics of Data.Stream.Future. As with Data.Stream.Future this stream is not a Monad, since the Applicative instance zips streams of potentially differing lengths. The random-access-list structure provides a number of operations logarithmic access time, but makes Data.Stream.Future.Skew.cons less productive. Where applicable Data.Stream.Infinite.Skew may be more efficient, due to a lazier and more efficient Applicative instance.
package bitstream
package
Fast, packed, strict and lazy bit vectors with stream fusion. This is like bytestring but stores bits instead of bytes. Version 0.2.0.3
closeDirStream :: DirStream -> IO ()
unix System.Posix.Directory.ByteString, unix System.Posix.Directory
closeDirStream dp calls closedir to close the directory stream dp.
package conduit-network-stream
package
A base layer for network protocols using Conduits Version 0.2
package ConsStream
package
debugByteStream :: HStream ty => FilePath -> HandleStream ty -> IO (HandleStream ty)
HTTP Network.StreamDebugger
debugStream :: Stream a => FilePath -> a -> IO (StreamDebugger a)
HTTP Network.StreamDebugger
Wraps a stream with logging I/O. The first argument is a filename which is opened in AppendMode.
data DecompressStream
zlib Codec.Compression.Zlib.Internal
A sequence of chunks of data produced from decompression. The difference from a simple list is that it contains a representation of errors as data rather than as exceptions. This allows you to handle error conditions explicitly.
data DirStream
unix System.Posix.Directory.ByteString, unix System.Posix.Directory
data DirStreamOffset
unix System.Posix.Directory.ByteString, unix System.Posix.Directory
foldDecompressStream :: (ByteString -> a -> a) -> a -> (DecompressError -> String -> a) -> DecompressStream -> a
zlib Codec.Compression.Zlib.Internal
Fold an DecompressionStream. Just like foldr but with an extra error case. For example to convert to a list and translate the errors into exceptions: > foldDecompressStream (:) [] (\code msg -> error msg)
fromDecompressStream :: DecompressStream -> ByteString
zlib Codec.Compression.Zlib.Internal
Convert a DecompressStream to a lazy ByteString. If any decompression errors are encountered then they are thrown as exceptions. This is a special case of foldDecompressStream.
getStreamHooks :: HandleStream ty -> IO (Maybe (StreamHooks ty))
HTTP Network.TCP
package gstreamer
package
This package provides a wrapper around the GStreamer C library. GStreamer is a library for constructing graphs of media-handling components. The applications it supports range from simple OggVorbis playback, audiovideo streaming to complex audio (mixing) and video (non-linear editing) processing. Version 0.12.5.0
data HandleStream a
HTTP Network.TCP
package hinze-streams
package
Numeric instances for infinite streams. An implementation of: Functional Pearl: Streams and Unique Fixed Points, Ralf Hinze, University of Oxford Streams, infinite sequences of elements, live in a coworld: they are given by a coinductive data type, operations on streams are implemented by corecursive programs, and proofs are conducted using coinduction. But there is more to it: suitably restricted, stream equations possess unique solutions, a fact that is not very widely appreciated. We show that this property gives rise to a simple and attractive proof technique essentially bringing equational reasoning to the coworld. In fact, we redevelop the theory of recurrences, finite calculus and generating functions using streams and stream operators building on the cornerstone of unique solutions. The development is constructive: streams and stream operators are implemented in Haskell, usually by one-liners. The resulting calculus or library, if you wish, is elegant and fun to use. Finally, we rephrase the proof of uniqueness using generalised algebraic data types. Along with the usual instances for infinite streams, this provides: Num, Enum, Real, Fractional, as well as recurrences on streams, finite calculus, generators Version 1.0
class BufferType bufType => HStream bufType
HTTP Network.TCP
HStream overloads the use of HandleStreams, letting you overload the handle operations over the type that is communicated across the handle. It comes in handy for Network.HTTP Request and Responses as the payload representation isn't fixed, but overloaded. The library comes with instances for ByteStrings and String, but should you want to plug in your own payload representation, defining your own HStream instance _should_ be all that it takes.
hstreamToConnection :: HandleStream String -> Connection
HTTP Network.TCP
package http-streams
package
Overview An HTTP client, using the Snap Framework's 'io-streams' library to hande the streaming IO. The API is optimized for ease of use for the rather common case of code needing to query web services and deal with the result. The library is exported in a single module; see Network.Http.Client for full documentation. Version 0.7.0.2
package io-streams
package
Overview The io-streams library contains simple and easy-to-use primitives for I/O using streams. Most users will want to import the top-level convenience module System.IO.Streams, which re-exports most of the library: > import           System.IO.Streams (InputStream, OutputStream) > import qualified System.IO.Streams as Streams For first-time users, io-streams comes with an included tutorial, which can be found in the System.IO.Streams.Tutorial module. Features The io-streams user API has two basic types: InputStream a and OutputStream a, and three fundamental I/O primitives: @ -- read an item from an input stream Streams.System.IO.Streams.read :: System.IO.Streams.InputStream a -> IO (Maybe a) -- push an item back to an input stream Streams.System.IO.Streams.unRead :: a -> System.IO.Streams.InputStream a -> IO () -- write to an output stream Streams.System.IO.Streams.write :: Maybe a -> System.IO.Streams.OutputStream a -> IO () @ Streams can be transformed by composition and hooked together with provided combinators: > ghci> Streams.fromList [1,2,3::Int] >>= Streams.map > (*10) >>= Streams.toList > [10,20,30] Stream composition leaves the original stream accessible: > ghci> input <- Streams.fromByteString &quot;long string&quot; > ghci> wrapped <- Streams.takeBytes 4 input > ghci> Streams.read wrapped > Just &quot;long&quot; > ghci> Streams.read wrapped > Nothing > ghci> Streams.read input > Just &quot; string&quot; Simple types and operations in the IO monad mean straightforward and simple exception handling and resource cleanup using Haskell standard library facilities like Control.Exception.bracket. io-streams comes with: * functions to use files, handles, concurrent channels, sockets, lists, vectors, and more as streams. * a variety of combinators for wrapping and transforming streams, including compression and decompression using zlib, controlling precisely how many bytes are read from or written to a stream, buffering output using bytestring builders, folds, maps, filters, zips, etc. * support for parsing from streams using attoparsec. * support for spawning processes and communicating with them using streams. ChangeLog 1.1.2.2: Allowed newest versions of the process, test-framework, and text libraries. 1.1.2.1: Fixed build error when compiled against attoparsec-0.10.0.x. 1.1.2.0: Added System.IO.Streams.Concurrent.makeChanPipe, to create a simple concurrent pipe between an InputStream/OutputStream pair. 1.1.1.0: Added System.IO.Streams.Network.socketToStreamsWithBufferSize, allowing control over the size of the receive buffers used when reading from sockets. 1.1.0.3: Fixed an inconsistent version upper bound in the test suite. 1.1.0.2: Fixed a typo in the tutorial. 1.1.0.1: A couple of Haddock markup fixes. 1.1.0.0: Reworked, simplified, and streamlined the internals of the library. Exports from System.IO.Streams.Internal relying on Sources and Sinks were deleted because they are no longer necessary: Source(..), Sink(..), defaultPushback, withDefaultPushback, nullSource, nullSink, singletonSource, simpleSource, sourceToStream, sinkToStream, generatorToSource, and consumerToSink. 1.0.2.2: Fixed a bug in which &quot;takeBytes 0&quot; was erroneously requesting input from the wrapped stream. 1.0.2.1: Fixed a compile error on GHC 7.0.x. 1.0.2.0: Added System.IO.Streams.Process (support for communicating with system processes using streams), added new functions to System.IO.Streams.Handle for converting io-streams types to System.IO.Handles. (Now you can pass streams from this library to places that expect Handles and everything will work.) 1.0.1.0: Added System.IO.Streams.Combinators.ignoreEof. 1.0.0.1: Fixed some haddock markup. Version 1.1.2.2
maxVertexStreams :: GettableStateVar QueryIndex
OpenGL Graphics.Rendering.OpenGL.GL.QueryObjects
package network-stream
package
Provides bytestring and text streams which support both retry's and invalidation for sending information before all information is known. Includes support for enumerating over the chunks of bytes or chunks of text sent. Version 0.1.0
module Network.HTTP.HandleStream
HTTP Network.HTTP.HandleStream
A HandleStream-based version of Network.HTTP interface. For more detailed information about what the individual exports do, please consult the documentation for Network.HTTP. Notice however that the functions here do not perform any kind of normalization prior to transmission (or receipt); you are responsible for doing any such yourself, or, if you prefer, just switch to using Network.HTTP function instead.
openDirStream :: FilePath -> IO DirStream
unix System.Posix.Directory
openDirStream dir calls opendir to obtain a directory stream for dir.
openDirStream :: RawFilePath -> IO DirStream
unix System.Posix.Directory.ByteString
openDirStream dir calls opendir to obtain a directory stream for dir.
openSocketStream :: HStream bufType => String -> Int -> Socket -> IO (HandleStream bufType)
HTTP Network.TCP
package openssl-streams
package
The openssl-streams library contains io-streams routines for secure networking using OpenSSL (by way of HsOpenSSL). ChangeLog 1.1.0.0: Updated openssl-streams to work with io-streams 1.1.0.0. Version 1.1.0.0
openStream :: HStream bufType => String -> Int -> IO (HandleStream bufType)
HTTP Network.TCP
package pipes-attoparsec-streaming
package
This module exports the single function parse, which can be used to run an Attoparsec parser in a streaming fashion, which means that the parser is not only run incrementally across the input (which can be done with plain Attoparsec or packages like pipes-attoparsec), but that the parse results are delivered incrementally.  This package can be seen as a kind of dual to pipes-attoparsec: the latter runs parser incrementally over their input, whereas the former incrementally delivers output. Version 0.1.0.0
package random-stream
package
Portable interface for the operating system source of pseudo random data. Supported sources are Unix devurandom, Win32 CryptGenRandom and OpenSSL pseudo random numbers generator. This package is based on idea from os.urandom implementation, in CPython. Version 0.1.1
readDirStream :: DirStream -> IO FilePath
unix System.Posix.Directory
readDirStream dp calls readdir to obtain the next directory entry (struct dirent) for the open directory stream dp, and returns the d_name member of that structure.
readDirStream :: DirStream -> IO RawFilePath
unix System.Posix.Directory.ByteString
readDirStream dp calls readdir to obtain the next directory entry (struct dirent) for the open directory stream dp, and returns the d_name member of that structure.
rewindDirStream :: DirStream -> IO ()
unix System.Posix.Directory.ByteString, unix System.Posix.Directory
rewindDirStream dp calls rewinddir to reposition the directory stream dp at the beginning of the directory.
seekDirStream :: DirStream -> DirStreamOffset -> IO ()
unix System.Posix.Directory.ByteString, unix System.Posix.Directory
setStreamHooks :: HandleStream ty -> StreamHooks ty -> IO ()
HTTP Network.TCP
package sock2stream
package
This is an initial implementation of a socket multiplexer/demultiplexer to tunnel Unix domain sockets over pipes/streams. The primary envisioned use is to tunnel Unix domain sockets over SSH like so: > mkfifo /tmp/sockin > ssh user@host socket2stream -l /path/to/remotesocket < /tmp/sockin > | socket2stream -r /path/to/localsocket > /tmp/sockin Version 0.3
data StdStream
process System.Process

Show more results