data-accessor-0.2.2.7: 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 #

Minimal complete definition

any

Methods

any :: ByteSource source => source a Source #

Instances

C Char Source # 

Methods

any :: ByteSource source => source Char Source #

C Int Source # 

Methods

any :: ByteSource source => source Int Source #

C Word8 Source # 

Methods

any :: ByteSource source => source Word8 Source #

class Monad source => ByteSource source where Source #

Minimal complete definition

readWord8

Methods

readWord8 :: source Word8 Source #

Instances

class ByteStream s where Source #

Minimal complete definition

getWord8

Methods

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

Instances

ByteCompatible byte => ByteStream [byte] Source # 

Methods

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

class ByteCompatible byte where Source #

Minimal complete definition

toByte

Methods

toByte :: byte -> 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 #