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.

At the moment, text-show provides instances for most data types in the array, base, bytestring, and text packages. Therefore, much of the source code for text-show consists of borrowed code from those packages in order to ensure that the behaviors of Show and TextShow coincide.

For most uses, simply importing TextShow will suffice:

module Main where

import TextShow

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

If you desire it, there are also monomorphic versions of the showb function available in the submodules of TextShow. See the naming conventions page for more information.

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


[Skip to Readme]

Modules

[Last Documentation]

  • TextShow
    • Control
      • TextShow.Control.Applicative
      • TextShow.Control.Concurrent
      • TextShow.Control.Exception
      • Monad
        • TextShow.Control.Monad.ST
    • Data
      • TextShow.Data.Array
      • TextShow.Data.Bool
      • TextShow.Data.ByteString
      • TextShow.Data.Char
      • TextShow.Data.Complex
      • TextShow.Data.Data
      • TextShow.Data.Dynamic
      • TextShow.Data.Either
      • TextShow.Data.Fixed
      • TextShow.Data.Floating
      • Functor
        • TextShow.Data.Functor.Compose
        • TextShow.Data.Functor.Identity
        • TextShow.Data.Functor.Product
        • TextShow.Data.Functor.Sum
      • TextShow.Data.Integral
      • TextShow.Data.List
        • TextShow.Data.List.NonEmpty
      • TextShow.Data.Maybe
      • TextShow.Data.Monoid
      • TextShow.Data.OldTypeable
      • TextShow.Data.Ord
      • TextShow.Data.Proxy
      • TextShow.Data.Ratio
      • TextShow.Data.Semigroup
      • TextShow.Data.Text
      • TextShow.Data.Tuple
      • Type
        • TextShow.Data.Type.Coercion
        • TextShow.Data.Type.Equality
      • TextShow.Data.Typeable
      • TextShow.Data.Version
      • TextShow.Data.Void
    • Debug
      • TextShow.Debug.Trace
        • TextShow.Debug.Trace.Generic
        • TextShow.Debug.Trace.TH
    • Foreign
      • C
        • TextShow.Foreign.C.Types
      • TextShow.Foreign.Ptr
    • TextShow.Functions
    • GHC
      • Conc
        • TextShow.GHC.Conc.Windows
      • TextShow.GHC.Event
      • TextShow.GHC.Fingerprint
      • TextShow.GHC.Generics
      • RTS
        • TextShow.GHC.RTS.Flags
      • TextShow.GHC.StaticPtr
      • TextShow.GHC.Stats
      • TextShow.GHC.TypeLits
    • TextShow.Generic
    • Numeric
      • TextShow.Numeric.Natural
    • System
      • TextShow.System.Exit
      • TextShow.System.IO
      • Posix
        • TextShow.System.Posix.Types
    • TextShow.TH
    • Text
      • TextShow.Text.Read

Flags

Manual Flags

NameDescriptionDefault
developer

Operate in developer mode (allows for faster recompilation of tests)

Disabled

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

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

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.3 && <4.9), base-compat (>=0.8.1 && <1), bifunctors (>=5.1 && <6), bytestring (>=0.9 && <0.11), bytestring-builder, containers (>=0.1 && <0.6), generic-deriving (>=1.9 && <2), ghc-boot (<8.0.2), ghc-prim, integer-gmp, nats (>=0.1 && <2), semigroups (>=0.17 && <1), tagged (>=0.4.4 && <1), template-haskell (>=2.5 && <2.12), text (>=0.11.1 && <1.3), th-lift (>=0.7.6 && <1), transformers (>=0.2.1 && <0.6), transformers-compat (>=0.5 && <1), void (>=0.5 && <1) [details]
Tested with ghc ==7.0.4, ghc ==7.2.2, ghc ==7.4.2, ghc ==7.6.3, ghc ==7.8.4, ghc ==7.10.3, ghc ==8.0.1
License BSD-3-Clause
Copyright (C) 2014-2015 Ryan Scott
Author Ryan Scott
Maintainer Ryan Scott <ryan.gl.scott@gmail.com>
Revised Revision 3 made by HerbertValerioRiedel at 2017-06-04T22:27:29Z
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 2016-02-05T05:23:31Z
Distributions Arch:3.10.3, Debian:3.8.5, LTSHaskell:3.10.5, NixOS:3.10.5, Stackage:3.11
Reverse Dependencies 59 direct, 1201 indirect [details]
Downloads 58624 total (353 in the last 30 days)
Rating 2.25 (votes: 5) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2016-02-12 [all 3 reports]

Readme for text-show-3

[back to package description]

text-show

Hackage Hackage Dependencies Haskell Programming Language BSD3 License 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.

At the moment, text-show provides instances for most data types in the array, base, bytestring, and text packages. Therefore, much of the source code for text-show consists of borrowed code from those packages in order to ensure that the behaviors of Show and TextShow coincide.

For most uses, simply importing TextShow will suffice:

module Main where

import TextShow

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

If you desire it, there are also monomorphic versions of the showb function available in the submodules of Text.Show.Text. See the naming conventions page for more information.

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