HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulebech32-th-1.1.7Haskell2010

Codec.Binary.Bech32.TH

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

  • 1 value
  • Packagebech32-th-1.1.7
  • Exports1
  • LanguageHaskell2010
  • LicenceApache-2.0
  • SourceTH.hs

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