blaze-builder-0.3.3.4: Efficient buffered output.

Copyright(c) 2010 Simon Meier
LicenseBSD3-style (see LICENSE)
MaintainerSimon Meier <iridcode@gmail.com>
Stabilityexperimental
Portabilitytested on GHC only
Safe HaskellSafe
LanguageHaskell98

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

newtype Put a #

Constructors

Put 

Fields

Instances

Monad Put # 

Methods

(>>=) :: Put a -> (a -> Put b) -> Put b #

(>>) :: Put a -> Put b -> Put b #

return :: a -> Put a #

fail :: String -> Put a #

Functor Put # 

Methods

fmap :: (a -> b) -> Put a -> Put b #

(<$) :: a -> Put b -> Put a #

Applicative Put # 

Methods

pure :: a -> Put a #

(<*>) :: Put (a -> b) -> Put a -> Put b #

liftA2 :: (a -> b -> c) -> Put a -> Put b -> Put c #

(*>) :: Put a -> Put b -> Put b #

(<*) :: Put a -> Put b -> Put a #

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.