text-show: Efficient conversion of values into Text

[ bsd3, library, text ] [ Propose Tags ] [ Report a vulnerability ]

text-show offers a replacement for the Show typeclass intended for use with Text instead of Strings. This package was created in the spirit of bytestring-show.

For most uses, simply importing TextShow will suffice:

module Main where

import TextShow

main :: IO ()
main = printT (Just "Hello, World!")

See also the naming conventions page.

Support for automatically deriving TextShow instances can be found in the TextShow.TH and TextShow.Generic modules.

text-show only provides instances for data types in the following packages:

This policy is in place to keep text-show's dependencies reasonably light. If you need a TextShow instance for a library that is not in this list, it may be covered by the text-show-instances library.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
integer-gmp

When building with a version of GHC older than 9.0, depend on the integer-gmp library. You can disable this if you do not wish to link against GMP, but at the expense of having a slower TextShow Natural instance.

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.4, 0.4.1, 0.5, 0.6, 0.6.0.1, 0.7, 0.7.0.1, 0.8, 0.8.1, 0.8.1.1, 1, 2, 2.1, 2.1.1, 2.1.2, 3, 3.0.1, 3.1, 3.2, 3.2.1, 3.2.2, 3.3, 3.4, 3.4.1, 3.4.1.1, 3.6, 3.6.2, 3.7, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5, 3.8, 3.8.1, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.9, 3.9.1, 3.9.2, 3.9.3, 3.9.4, 3.9.5, 3.9.6, 3.9.7, 3.10, 3.10.1, 3.10.2, 3.10.3, 3.10.4, 3.10.5, 3.11
Change log CHANGELOG.md
Dependencies array (>=0.3 && <0.6), base (>=4.9 && <4.22), base-compat-batteries (>=0.11 && <0.15), bifunctors (>=5.1 && <6), bytestring (>=0.10.8.1 && <0.13), containers (>=0.1 && <0.8), ghc-boot-th (>=8.0 && <9.13), ghc-prim, integer-gmp, template-haskell (>=2.11 && <2.23), text (>=1.1 && <2.2), th-abstraction (>=0.5 && <0.8), transformers (>=0.5 && <0.7), transformers-compat (>=0.5 && <1) [details]
Tested with ghc ==8.0.2, ghc ==8.2.2, ghc ==8.4.4, ghc ==8.6.5, ghc ==8.8.4, ghc ==8.10.7, ghc ==9.0.2, ghc ==9.2.8, ghc ==9.4.8, ghc ==9.6.6, ghc ==9.8.2, ghc ==9.10.1, ghc ==9.12.1
License BSD-3-Clause
Copyright (C) 2014-2017 Ryan Scott
Author Ryan Scott
Maintainer Ryan Scott <ryan.gl.scott@gmail.com>
Category Text
Home page https://github.com/RyanGlScott/text-show
Bug tracker https://github.com/RyanGlScott/text-show/issues
Source repo head: git clone https://github.com/RyanGlScott/text-show
Uploaded by ryanglscott at 2024-10-23T11:44:34Z
Distributions Arch:3.10.3, Debian:3.8.5, LTSHaskell:3.11, NixOS:3.10.5, Stackage:3.11
Reverse Dependencies 59 direct, 1202 indirect [details]
Downloads 58762 total (211 in the last 30 days)
Rating 2.25 (votes: 5) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for text-show-3.11

[back to package description]

text-show

Hackage Hackage Dependencies Haskell Programming Language BSD3 License Linux build Windows build

text-show offers a replacement for the Show typeclass intended for use with Text instead of Strings. This package was created in the spirit of bytestring-show.

For most uses, simply importing TextShow will suffice:

module Main where

import TextShow

main :: IO ()
main = printT (Just "Hello, World!")

See also the naming conventions page.

Support for automatically deriving TextShow instances can be found in the TextShow.TH and TextShow.Generic modules.

Scope of the library

text-show only provides instances for data types in the following packages:

This policy is in place to keep text-show's dependencies reasonably light. If you need a TextShow instance for a library that is not in this list, it may be covered by the text-show-instances library.