bytebuild-0.3.11.0: Build byte arrays
Safe HaskellNone
LanguageHaskell2010

Data.Bytes.Builder.Class

Synopsis

Documentation

class ToBuilder a where Source #

Types that can be encoded as a builder. Human-readable encodings are used when possible. For example, numbers are encoded an ascii-encoded decimal characters. UTF-8 is preferred for textual types. For types that represent arbitrary bytes (e.g. Bytes, ByteString), the bytes are preserved.

The goal of this typeclass is to reduce the size of builders produced by quasiquotation.

Methods

toBuilder :: a -> Builder Source #

Instances

Instances details
ToBuilder Double Source #

uses doubleDec

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Int Source #

Uses intDec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Int8 Source #

Uses int8Dec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Int16 Source #

Uses int16Dec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Int32 Source #

Uses int32Dec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Int64 Source #

Uses int64Dec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Word Source #

Uses wordDec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Word8 Source #

Uses word8Dec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Word16 Source #

Uses word16Dec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Word32 Source #

Uses word32Dec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Word64 Source #

Uses word64Dec.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder String Source #

Uses stringUtf8

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder ShortByteString Source #

Uses shortByteString

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder ByteArray Source #

Uses byteArray

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Bytes Source #

Uses bytes.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder ShortText Source #

Uses shortTextUtf8.

Instance details

Defined in Data.Bytes.Builder.Class

ToBuilder Builder Source #

Identity

Instance details

Defined in Data.Bytes.Builder.Class