fmt-0.6.1.1: A new formatting library

Safe HaskellNone
LanguageHaskell2010

Fmt.Internal

Contents

Description

A module providing access to internals (in case you really need them). Can change at any time, though probably won't.

Synopsis

Classes

class FormatAsHex a where #

Methods

hexF :: a -> Builder #

Format a number or bytestring as hex:

>>> hexF 3635
"e33"
>>> hexF ("\0\50\63\80" :: BS.ByteString)
"00323f50"
Instances
Integral a => FormatAsHex a # 
Instance details

Defined in Fmt.Internal

Methods

hexF :: a -> Builder #

FormatAsHex ByteString # 
Instance details

Defined in Fmt.Internal

Methods

hexF :: ByteString -> Builder #

FormatAsHex ByteString # 
Instance details

Defined in Fmt.Internal

Methods

hexF :: ByteString -> Builder #

class FormatAsBase64 a where #

Methods

base64F :: a -> Builder #

Convert a bytestring to base64:

>>> base64F ("\0\50\63\80" :: BS.ByteString)
"ADI/UA=="

base64UrlF :: a -> Builder #

Convert a bytestring to base64url (a variant of base64 which omits / and thus can be used in URLs):

>>> base64UrlF ("\0\50\63\80" :: BS.ByteString)
"ADI_UA=="
Instances
FormatAsBase64 ByteString # 
Instance details

Defined in Fmt.Internal

FormatAsBase64 ByteString # 
Instance details

Defined in Fmt.Internal

Reexports