dahdit-0.5.1: Binary parsing and serialization with integrated size
Safe HaskellSafe-Inferred
LanguageHaskell2010

Dahdit.Run

Synopsis

Documentation

runGetInternal :: ReadMem r m => ByteCount -> Get a -> ByteCount -> r -> m (Either GetError a, ByteCount) Source #

Get from a single buffer

data GetIncEnv s r Source #

Constructors

GetIncEnv 

Fields

data GetIncChunk r Source #

Constructors

GetIncChunk 

Fields

data GetIncRequest Source #

A request for more data. Includes absolute position, offset in the current buffer, and required length.

data GetIncSuspend z x Source #

See GetIncCb - this is the functor-ized version so we can suspend execution.

Constructors

GetIncSuspend !GetIncRequest !(Maybe z -> x) 

Instances

Instances details
Functor (GetIncSuspend z) Source # 
Instance details

Defined in Dahdit.Run

Methods

fmap :: (a -> b) -> GetIncSuspend z a -> GetIncSuspend z b #

(<$) :: a -> GetIncSuspend z b -> GetIncSuspend z a #

type GetIncCb z m = GetIncRequest -> m (Maybe z) Source #

Return new chunk containing enough data (or nothing).

runGetIncInternal :: (MonadPrim s m, ReadMem r m) => Get a -> GetIncEnv s r -> GetIncCbChunk r m -> m (Either GetError a, ByteCount, ByteCount) Source #