HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulebase64-bytestring-type-1.0.1Haskell2010

Data.ByteString.Base64.URL.Type

Strict ByteString base64 encoding with URL and filename safe alphabet.

See https://tools.ietf.org/html/rfc4648.

Synopsis
newtypenewtype ByteString64

Aeson serialisable bytestring. Uses base64 encoding.

The inner ByteString is in raw format.

Example2 expressions
let bs64 = makeByteString64 "foobar"bs64mkBS64 "foobar"

Binary instance doesn't use base64 encoding:

Example1 expression
Binary.encode bs64"\NUL\NUL\NUL\NUL\NUL\NUL\NUL\ACKfoobar"

Aeson instance does:

Example1 expression
Aeson.encode bs64"\"Zm9vYmFy\""

This module uses standard alphabet

Example1 expression
Aeson.encode (makeByteString64 "aa\191")"\"YWG_\""
Instances23Eq, Data, Ord, Show, IsString, Generic, …