chunked-data-0.3.1: Typeclasses for dealing with various chunked data representations

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Builder

Description

Abstraction for different kinds of builders.

Note that whenever a character encoding is used, it will be UTF8. For different behavior, please use the underlying library.

Synopsis

- type TextBuilder = Builder
- type BlazeBuilder = Builder
- type ByteStringBuilder = Builder
- class Monoid builder => Builder builder lazy | builder -> lazy, lazy -> builder where
  - builderToLazy :: builder -> lazy
  - flushBuilder :: builder
- class ToBuilder value builder where
  - toBuilder :: value -> builder
- textToBuilder :: ToBuilder Text builder => Text -> builder

# Documentation

type TextBuilder = Builder Source #

Since 0.1.0.0

type BlazeBuilder = Builder Source #

Since 0.1.0.0

type ByteStringBuilder = Builder Source #

Since 0.3.0.0

class Monoid builder => Builder builder lazy | builder -> lazy, lazy -> builder where Source #

Since 0.1.0.0

Methods

builderToLazy :: builder -> lazy Source #

Since 0.1.0.0

flushBuilder :: builder Source #

Since 0.1.0.0

#### Instances

Instances details

Builder Builder ByteString Source # |
Instance details Defined in Data.Builder Methods builderToLazy :: Builder -> ByteString Source # flushBuilder :: Builder Source #
Builder Builder Text Source # |
Instance details Defined in Data.Builder Methods builderToLazy :: Builder -> Text Source # flushBuilder :: Builder Source #

class ToBuilder value builder where Source #

Since 0.1.0.0

Methods

toBuilder :: value -> builder Source #

Since 0.1.0.0

#### Instances

Instances details

ToBuilder Builder Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: Builder -> Builder Source #
ToBuilder ByteString Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: ByteString -> Builder Source #
ToBuilder ByteString Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: ByteString -> Builder Source #
ToBuilder Text Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: Text -> Builder Source #
ToBuilder Text Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: Text -> Builder Source #
ToBuilder Builder Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: Builder -> Builder Source #
ToBuilder Text Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: Text -> Builder Source #
ToBuilder Text Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: Text -> Builder Source #
ToBuilder Char Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: Char -> Builder Source #
ToBuilder Char Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: Char -> Builder Source #
a ~ Char => ToBuilder [a] Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: [a] -> Builder Source #
a ~ Char => ToBuilder [a] Builder Source # |
Instance details Defined in Data.Builder Methods toBuilder :: [a] -> Builder Source #

textToBuilder :: ToBuilder Text builder => Text -> builder Source #

Provided for type disambiguation in the presence of OverloadedStrings.

Since 0.1.0.0