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

Safe HaskellSafe
LanguageHaskell98

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] Source #

class C a where Source #

Methods

any :: ByteSource source => source a Source #

Instances
C Char Source # 
Instance details

Defined in Data.Accessor.BinaryRead

Methods

any :: ByteSource source => source Char Source #

C Int Source # 
Instance details

Defined in Data.Accessor.BinaryRead

Methods

any :: ByteSource source => source Int Source #

C Word8 Source # 
Instance details

Defined in Data.Accessor.BinaryRead

Methods

any :: ByteSource source => source Word8 Source #

class Monad source => ByteSource source where Source #

Methods

readWord8 :: source Word8 Source #

Instances
(ByteStream s, Monad m) => ByteSource (StateT s m) Source # 
Instance details

Defined in Data.Accessor.ByteSource

Methods

readWord8 :: StateT s m Word8 Source #

class ByteStream s where Source #

Methods

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

Instances
ByteCompatible byte => ByteStream [byte] Source # 
Instance details

Defined in Data.Accessor.ByteSource

Methods

getWord8 :: Monad m => [byte] -> m (Word8, [byte]) Source #

class ByteCompatible byte where Source #

Methods

toByte :: byte -> Word8 Source #

Instances
ByteCompatible Word8 Source # 
Instance details

Defined in Data.Accessor.ByteSource

Methods

toByte :: Word8 -> Word8 Source #

newtype Parser s r Source #

Constructors

Parser 

Fields

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

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