text-format-0.1.0.0: Text formatting

PortabilityGHC
Stabilityexperimental
Maintainerbos@mailrank.com

Data.Text.Format.Types

Description

Types for text mangling.

Synopsis

Documentation

data Format Source

Control the rendering of floating point numbers.

Constructors

Exponent

Scientific notation (e.g. 2.3e123).

Fixed

Standard decimal notation.

Generic

Use decimal notation for values between 0.1 and 9,999,999, and scientific notation otherwise.

newtype Fast a Source

Render a floating point number using a much faster algorithm than the default (up to 10x faster). This performance comes with a potential cost in readability, as the faster algorithm can produce strings that are longer than the default algorithm (e.g. "1.3300000000000001" instead of "1.33").

Constructors

Fast 

Fields

fromFast :: a
 

Instances

Eq a => Eq (Fast a) 
Floating a => Floating (Fast a) 
Fractional a => Fractional (Fast a) 
Num a => Num (Fast a) 
Ord a => Ord (Fast a) 
Read a => Read (Fast a) 
Real a => Real (Fast a) 
RealFloat a => RealFloat (Fast a) 
RealFrac a => RealFrac (Fast a) 
Show a => Show (Fast a) 
Buildable (Fast Double) 
Buildable (Fast Float) 

newtype Only a Source

Use this newtype wrapper for your single parameter if you are formatting a string containing exactly one substitution site.

Constructors

Only 

Fields

fromOnly :: a
 

Instances

Bounded a => Bounded (Only a) 
Enum a => Enum (Only a) 
Eq a => Eq (Only a) 
Floating a => Floating (Only a) 
Fractional a => Fractional (Only a) 
Integral a => Integral (Only a) 
Num a => Num (Only a) 
Ord a => Ord (Only a) 
Read a => Read (Only a) 
Real a => Real (Only a) 
RealFloat a => RealFloat (Only a) 
RealFrac a => RealFrac (Only a) 
Show a => Show (Only a) 
Buildable a => Params (Only a) 

newtype Shown a Source

Render a value using its Show instance.

Constructors

Shown 

Fields

shown :: a
 

Instances

Bounded a => Bounded (Shown a) 
Enum a => Enum (Shown a) 
Eq a => Eq (Shown a) 
Floating a => Floating (Shown a) 
Fractional a => Fractional (Shown a) 
Integral a => Integral (Shown a) 
Num a => Num (Shown a) 
Ord a => Ord (Shown a) 
Read a => Read (Shown a) 
Real a => Real (Shown a) 
RealFloat a => RealFloat (Shown a) 
RealFrac a => RealFrac (Shown a) 
Show a => Show (Shown a) 
Show a => Buildable (Shown a)