blaze-builder-0.3.1.0: Efficient buffered output.

Portabilitytested on GHC only
Stabilityexperimental
MaintainerSimon Meier <iridcode@gmail.com>
Safe HaskellNone

Blaze.ByteString.Builder.Internal.Types

Description

Core types and functions for the Builder monoid and the Put monad based based on the 'blaze-builder' library by Jasper van der Jeugt and Simon Meier.

Synopsis

Documentation

data BufRange

Constructors

BufRange !(Ptr Word8) !(Ptr Word8) 

newtype BuildStep a

Constructors

BuildStep 

done :: Ptr Word8 -> a -> BuildSignal a

newtype Builder

Constructors

Builder 

Fields

unBuilder :: forall r. BuildStep r -> BuildStep r
 

Instances

newtype Put a

Constructors

Put 

Fields

unPut :: forall r. (a -> BuildStep r) -> BuildStep r
 

Instances

putBuildStepCont :: (forall r. (a -> BufRange -> IO (BuildSignal r)) -> BufRange -> IO (BuildSignal r)) -> Put a

fromBuildStepCont :: (forall r. (BufRange -> IO (BuildSignal r)) -> BufRange -> IO (BuildSignal r)) -> Builder

putBuilder :: Builder -> Put ()

Put the given builder.

fromPut :: Put a -> Builder

Ignore the value of a put and only exploit its output side effect.

putLiftIO :: IO a -> Put a

Lift the given IO action.