memory-0.15.0: memory and related abstraction stuff
CopyrightCopyright © 2014 Nicolas DI PRIMA
LicenseBSD-Style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Data.ByteArray.Pack.Internal

Description

 
Synopsis

Documentation

data Result a Source #

Packing result:

  • PackerMore: the next state of Packing with an arbitrary value
  • PackerFail: an error happened

Instances

Instances details
Show a => Show (Result a) Source # 
Instance details

Defined in Data.ByteArray.Pack.Internal

newtype Packer a Source #

Simple ByteArray Packer

Constructors

Packer 

Fields

Instances

Instances details
Monad Packer Source # 
Instance details

Defined in Data.ByteArray.Pack.Internal

Methods

(>>=) :: Packer a -> (a -> Packer b) -> Packer b Source #

(>>) :: Packer a -> Packer b -> Packer b Source #

return :: a -> Packer a Source #

Functor Packer Source # 
Instance details

Defined in Data.ByteArray.Pack.Internal

Methods

fmap :: (a -> b) -> Packer a -> Packer b Source #

(<$) :: a -> Packer b -> Packer a Source #

Applicative Packer Source # 
Instance details

Defined in Data.ByteArray.Pack.Internal

Methods

pure :: a -> Packer a Source #

(<*>) :: Packer (a -> b) -> Packer a -> Packer b Source #

liftA2 :: (a -> b -> c) -> Packer a -> Packer b -> Packer c Source #

(*>) :: Packer a -> Packer b -> Packer b Source #

(<*) :: Packer a -> Packer b -> Packer a Source #

actionPacker :: Int -> (Ptr Word8 -> IO a) -> Packer a Source #

run a sized action

actionPackerWithRemain :: Int -> (Ptr Word8 -> Int -> IO (Int, a)) -> Packer a Source #

run a sized action