HTTP-4000.0.4: A library for client-side HTTPContentsIndex
Network.BufferType
Portabilitynon-portable (not tested)
Stabilityexperimental
MaintainerSigbjorn Finne <sigbjorn.finne@gmail.com>
Description
Operations over wire-transmitted values.
Synopsis
class BufferType bufType where
bufferOps :: BufferOp bufType
data BufferOp a = BufferOp {
buf_hGet :: Handle -> Int -> IO a
buf_hGetContents :: Handle -> IO a
buf_hPut :: Handle -> a -> IO ()
buf_hGetLine :: Handle -> IO a
buf_empty :: a
buf_append :: a -> a -> a
buf_fromStr :: String -> a
buf_toStr :: a -> String
buf_snoc :: a -> Word8 -> a
buf_splitAt :: Int -> a -> (a, a)
buf_span :: (Char -> Bool) -> a -> (a, a)
buf_isLineTerm :: a -> Bool
buf_isEmpty :: a -> Bool
}
strictBufferOp :: BufferOp ByteString
lazyBufferOp :: BufferOp ByteString
stringBufferOp :: BufferOp String
Documentation
class BufferType bufType where
The BufferType class encodes, in a mixed-mode way, the interface that the library requires to operate over data embedded in HTTP requests and responses. That is, we use explicit dictionaries for the operations, but overload the name of these dicts.
Methods
bufferOps :: BufferOp bufType
show/hide Instances
data BufferOp a
Constructors
BufferOp
buf_hGet :: Handle -> Int -> IO a
buf_hGetContents :: Handle -> IO a
buf_hPut :: Handle -> a -> IO ()
buf_hGetLine :: Handle -> IO a
buf_empty :: a
buf_append :: a -> a -> a
buf_fromStr :: String -> a
buf_toStr :: a -> String
buf_snoc :: a -> Word8 -> a
buf_splitAt :: Int -> a -> (a, a)
buf_span :: (Char -> Bool) -> a -> (a, a)
buf_isLineTerm :: a -> Bool
buf_isEmpty :: a -> Bool
show/hide Instances
strictBufferOp :: BufferOp ByteString
lazyBufferOp :: BufferOp ByteString
stringBufferOp :: BufferOp String
Produced by Haddock version 2.3.0