Safe Haskell | None |
---|---|
Language | Haskell2010 |
A module providing access to internals (in case you really need them). Can change at any time, though probably won't.
Synopsis
- class FormatAsHex a where
- class FormatAsBase64 a where
- base64F :: a -> Builder
- base64UrlF :: a -> Builder
- module Fmt.Internal.Core
- module Fmt.Internal.Formatters
- module Fmt.Internal.Template
- module Fmt.Internal.Tuple
- module Fmt.Internal.Numeric
- module Fmt.Internal.Generic
Classes
class FormatAsHex a where Source #
Format a number or bytestring as hex:
>>>
hexF 3635
"e33">>>
hexF ("\0\50\63\80" :: BS.ByteString)
"00323f50"
Instances
Integral a => FormatAsHex a Source # | |
Defined in Fmt.Internal | |
FormatAsHex ByteString Source # | |
Defined in Fmt.Internal hexF :: ByteString -> Builder Source # | |
FormatAsHex ByteString Source # | |
Defined in Fmt.Internal hexF :: ByteString -> Builder Source # |
class FormatAsBase64 a where Source #
base64F :: a -> Builder Source #
Convert a bytestring to base64:
>>>
base64F ("\0\50\63\80" :: BS.ByteString)
"ADI/UA=="
base64UrlF :: a -> Builder Source #
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 Source # | |
Defined in Fmt.Internal base64F :: ByteString -> Builder Source # base64UrlF :: ByteString -> Builder Source # | |
FormatAsBase64 ByteString Source # | |
Defined in Fmt.Internal base64F :: ByteString -> Builder Source # base64UrlF :: ByteString -> Builder Source # |
Reexports
module Fmt.Internal.Core
module Fmt.Internal.Formatters
module Fmt.Internal.Template
module Fmt.Internal.Tuple
module Fmt.Internal.Numeric
module Fmt.Internal.Generic