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

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

Text.Show.Text.Data.Floating

Description

Monomorphic Show functions for floating-point types.

Since: 0.3

Synopsis

Documentation

showbRealFloatPrec :: RealFloat a => Int -> a -> Builder Source

Convert a RealFloat value to a Builder with the given precedence.

Since: 0.3

showbFloatPrec :: Int -> Float -> Builder Source

Convert a Float to a Builder with the given precedence.

Since: 0.3

showbDoublePrec :: Int -> Double -> Builder Source

Convert a Double to a Builder with the given precedence.

Since: 0.3

showbEFloat :: RealFloat a => Maybe Int -> a -> Builder Source

Show a signed RealFloat value using scientific (exponential) notation (e.g. 2.45e2, 1.5e-3).

In the call showbEFloat digs val, if digs is Nothing, the value is shown to full precision; if digs is Just d, then at most d digits after the decimal point are shown.

Since: 0.3

showbFFloat :: RealFloat a => Maybe Int -> a -> Builder Source

Show a signed RealFloat value using standard decimal notation (e.g. 245000, 0.0015).

In the call showbFFloat digs val, if digs is Nothing, the value is shown to full precision; if digs is Just d, then at most d digits after the decimal point are shown.

Since: 0.3

showbGFloat :: RealFloat a => Maybe Int -> a -> Builder Source

Show a signed RealFloat value using standard decimal notation for arguments whose absolute value lies between 0.1 and 9,999,999, and scientific notation otherwise.

In the call showbGFloat digs val, if digs is Nothing, the value is shown to full precision; if digs is Just d, then at most d digits after the decimal point are shown.

Since: 0.3

showbFFloatAlt :: RealFloat a => Maybe Int -> a -> Builder Source

Show a signed RealFloat value using standard decimal notation (e.g. 245000, 0.0015).

This behaves as showFFloat, except that a decimal point is always guaranteed, even if not needed.

Since: 0.3

showbGFloatAlt :: RealFloat a => Maybe Int -> a -> Builder Source

Show a signed RealFloat value using standard decimal notation for arguments whose absolute value lies between 0.1 and 9,999,999, and scientific notation otherwise.

This behaves as showFFloat, except that a decimal point is always guaranteed, even if not needed.

Since: 0.3