data-accessor-0.2.3.1: Utilities for accessing and manipulating fields of records
Safe HaskellSafe-Inferred
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

Instances details
C Word8 Source # 
Instance details

Defined in Data.Accessor.BinaryRead

Methods

any :: ByteSource source => source Word8 Source #

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 #

class Monad source => ByteSource source where Source #

Methods

readWord8 :: source Word8 Source #

Instances

Instances details
(ByteStream s, MonadFail 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 :: MonadFail m => s -> m (Word8, s) Source #

Instances

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

Defined in Data.Accessor.ByteSource

Methods

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

class ByteCompatible byte where Source #

Methods

toByte :: byte -> Word8 Source #

Instances

Instances details
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 #