formattable-0.1.1: Business-quality formatting of numbers, dates, and other things

CopyrightSoostone Inc
LicenseBSD3
Maintainerlibs@soostone.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Formattable

Description

Practical formatting interface for output values intended for human consumption. We try to support several variants often required by real-world applications.

Synopsis

Documentation

class Format a where Source

Provides a uniform interface for formatting all kinds of types.

Associated Types

type TheFormat a Source

A format settings type specific to the object type.

Methods

runFormat :: TheFormat a -> a -> Text Source

Render into text using format settings

Instances

Format Bool

TheFormat = ()

Format Double

TheFormat = NumFormat

Format Float

TheFormat = NumFormat

Format Int

TheFormat = NumFormat

Format Int8

TheFormat = NumFormat

Format Int16

TheFormat = NumFormat

Format Int32

TheFormat = NumFormat

Format Int64

TheFormat = NumFormat

Format Integer

TheFormat = NumFormat

Format Word

TheFormat = NumFormat

Format Word8

TheFormat = NumFormat

Format Word16

TheFormat = NumFormat

Format Word32

TheFormat = NumFormat

Format Word64

TheFormat = NumFormat

Format Text

TheFormat = ()

Format UTCTime

TheFormat = String

Format Day

TheFormat = String