text-show: Efficient conversion of values into Text
text-show
offers a replacement for the Show
typeclass intended
for use with Text
instead of String
s. This package was created
in the spirit of
bytestring-show
.
At the moment, text-show
provides Show
instances for most data
types in the array
,
base
,
bytestring
,
containers
,
text
, and
time
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 the two Show
typeclasses coincide.
For most uses, simply importing Text.Show.Text will suffice:
{-# LANGUAGE NoImplicitPrelude #-} module Main where import Data.Text (Text) import Prelude hiding (Show(..), print) import Text.Show.Text number :: Text number = show 27 main :: IO () main = print number
If you desire it, there are also monomorphic versions of the showb
function available in the submodules of Text.Show.Text. A naming
convention is present in which functions that show different values
depending on the precedence end with Prec
(e.g., showbIntPrec
),
whereas functions that show the same values regardless of
precedence do not end with Prec
(e.g., showbBool
).
[Skip to Readme]
Modules
[Index]
- Text
- Show
- Text.Show.Text
- Control
- Data
- Text.Show.Text.Data.Array
- Text.Show.Text.Data.Bool
- Text.Show.Text.Data.ByteString
- Text.Show.Text.Data.Char
- Text.Show.Text.Data.Containers
- Text.Show.Text.Data.Data
- Text.Show.Text.Data.Dynamic
- Text.Show.Text.Data.Either
- Text.Show.Text.Data.Fixed
- Text.Show.Text.Data.Floating
- Text.Show.Text.Data.Integral
- Text.Show.Text.Data.List
- Text.Show.Text.Data.Maybe
- Text.Show.Text.Data.Monoid
- Text.Show.Text.Data.Ord
- Text.Show.Text.Data.Text
- Text.Show.Text.Data.Time
- Text.Show.Text.Data.Tuple
- Type
- Text.Show.Text.Data.Typeable
- Text.Show.Text.Data.Version
- Foreign
- Text.Show.Text.Functions
- GHC
- System
- Text.Show.Text.TH
- Text
- Text.Show.Text
- Show
Downloads
- text-show-0.3.0.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
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
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.4 && <5), bytestring (>=0.9 && <0.11), containers (>=0.1 && <0.6), ghc-prim, template-haskell (>=2.4 && <2.10), text (>=0.2 && <1.3), text-format (>=0.2 && <0.4), time (>=0.1 && <1.6) [details] |
License | BSD-3-Clause |
Author | Ryan Scott |
Maintainer | Ryan Scott <ryan.gl.scott@gmail.com> |
Revised | Revision 2 made by HerbertValerioRiedel at 2019-04-26T18:56:24Z |
Category | Text |
Home page | https://github.com/RyanGlScott/text-show |
Bug tracker | https://github.com/RyanGlScott/text-show/issues |
Source repo | head: git clone git://github.com/RyanGlScott/text-show.git |
Uploaded | by ryanglscott at 2014-12-06T03:30: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, 1200 indirect [details] |
Downloads | 58256 total (261 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] |