HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulebech32-th-1.1.11Haskell2010

Codec.Binary.Bech32.TH

This module contains Template-Haskell-specific extensions to the Bech32 library.

  • 1 value

Quasi-Quotation Support

1 declaration

A quasiquoter for Bech32 human-readable prefixes.

This quasiquoter makes it possible to construct values of type HumanReadablePart at compile time, using string literals.

Failure to parse a string literal will result in a compile-time error.

See Codec.Binary.Bech32.HumanReadablePartError for the set of possible errors that can be raised.

Example:

Example6 expressions
:set -XQuasiQuotesimport Codec.Binary.Bech32import Codec.Binary.Bech32.THlet addrPrefix = [humanReadablePart|addr|]addrPrefixHumanReadablePart "addr":t addrPrefixaddrPrefix :: HumanReadablePart