text-show-0.1.0.0: Efficient conversion of values into Text

Copyright(C) 2014 Ryan Scott
LicenseBSD-style (see the file LICENSE)
MaintainerRyan Scott
StabilityExperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell98

Text.Show.Text

Contents

Description

Efficiently convert from values to Text via Builders.

Synopsis

The Show class

class Show a where Source

Conversion of values to Text.

Minimal complete definition

showbPrec | showb

Methods

showbPrec :: Int -> a -> Builder Source

Constructs a Text via an efficient Builder. The precedence is used to determine where to put parentheses in a shown expression involving operators.

Builders can be efficiently combined, so the showb functions are available for showing multiple values before producing an output Text.

showb :: a -> Builder Source

Constructs a Text via an efficient Builder. Builders can be efficiently combined, so this is available building a Text from multiple values.

showbList :: [a] -> Builder Source

Allows for specialized display of lists. This is used, for example, when showing lists of Chars.

Instances

Show Bool 
Show Char 
Show Double 
Show Float 
Show Int 
Show Int8 
Show Int16 
Show Int32 
Show Int64 
Show Integer 
Show Ordering 
Show Word 
Show Word8 
Show Word16 
Show Word32 
Show Word64 
Show () 
Show Builder 
Show a => Show [a] 
(Show a, Integral a) => Show (Ratio a) 
(Show a, RealFloat a) => Show (Complex a) 
Show a => Show (Maybe a) 
Show e => Show (Set e) 
(Show a, Show b) => Show (Either a b) 
(Show a, Show b) => Show (a, b) 
(Show i, Show e, Ix i) => Show (Array i e) 
(Show k, Show v) => Show (Map k v) 
(Show a, Show b, Show c) => Show (a, b, c) 
(Show a, Show b, Show c, Show d) => Show (a, b, c, d) 
(Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e) 
(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f) 
(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g) 
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show (a, b, c, d, e, f, g, h) 
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show (a, b, c, d, e, f, g, h, i) 
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => Show (a, b, c, d, e, f, g, h, i, j) 
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => Show (a, b, c, d, e, f, g, h, i, j, k) 
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => Show (a, b, c, d, e, f, g, h, i, j, k, l) 
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m) 
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 

show :: Show a => a -> Text Source

Constructs a Text from a single value.

Builder construction

showbParen :: Bool -> Builder -> Builder Source

Surrounds Builder output with parentheses if the Bool parameter is True.

showbLitChar :: Char -> Builder Source

Constructs a Builder with one character (without single quotes).

showbLitString :: String -> Builder Source

Constructs a Builder with one String (without double quotes).

unlinesB :: [Builder] -> Builder Source

Merges several Builders, separating them by newlines.

unwordsB :: [Builder] -> Builder Source

Merges several Builders, separating them by spaces.

Printing values

print :: Show a => a -> IO () Source

Prints a value's Text representation to the standard output.