Data.Accessor.BinaryRead

data-accessor-0.2.2.7: Utilities for accessing and manipulating fields of records

Safe Haskell | Safe
Language | Haskell98

Data.Accessor.BinaryRead

Description

Reading records from streams

This is still only for demonstration and might be of not much use and you should not rely on the interface.

# Documentation

type Stream = [Word8]

class C a where

Methods

any :: ByteSource source => source a

Instances

C Char |
C Int |
C Word8 |

class Monad source => ByteSource source where

Methods

readWord8 :: source Word8

Instances

(ByteStream s, Monad m) => ByteSource (StateT s m) |

class ByteStream s where

Methods

getWord8 :: Monad m => s -> m (Word8, s)

Instances

ByteCompatible byte => ByteStream [byte] |

class ByteCompatible byte where

Methods

toByte :: byte -> Word8

Instances

ByteCompatible Word8 |

newtype Parser s r

Constructors

Parser |
Fields runParser :: (r, s) -> Maybe (r, s)

field :: (ByteStream s, C a) => T r a -> Parser s r

record :: [Parser s r] -> Parser s r