oalg-base-1.1.4.0: Algebraic structures on oriented entities and limits as a tool kit to solve algebraic problems.
Copyright(c) Erich Gut
LicenseBSD3
Maintainerzerich.gut@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

OAlg.Control.Verbose

Description

verbosity on showing.

Synopsis

Verbose

class Show a => Verbose a where Source #

shows a in the context of verbosity.

Minimal complete definition

Nothing

Methods

vshow :: Verbosity -> a -> String Source #

the default implementation is: vshow v a = vshowStr (mnString v) (show a)

Instances

Instances details
Verbose Label Source # 
Instance details

Defined in OAlg.Data.Statement.Definition

Verbose Message Source # 
Instance details

Defined in OAlg.Data.Statement.Definition

Verbose Parameter Source # 
Instance details

Defined in OAlg.Data.Statement.Definition

Verbose V Source # 
Instance details

Defined in OAlg.Data.Statement.Definition

Methods

vshow :: Verbosity -> V -> String Source #

Verbose Integer Source # 
Instance details

Defined in OAlg.Control.Verbose

Verbose () Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> () -> String Source #

Verbose Char Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> Char -> String Source #

Verbose Double Source # 
Instance details

Defined in OAlg.Control.Verbose

Verbose Int Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> Int -> String Source #

Verbose (Percent Double) Source # 
Instance details

Defined in OAlg.Control.Verbose

Verbose a => Verbose [a] Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> [a] -> String Source #

(Verbose a, Verbose b) => Verbose (a, b) Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> (a, b) -> String Source #

(Verbose a, Verbose b, Verbose c) => Verbose (a, b, c) Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> (a, b, c) -> String Source #

(Verbose a, Verbose b, Verbose c, Verbose d) => Verbose (a, b, c, d) Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> (a, b, c, d) -> String Source #

(Verbose a, Verbose b, Verbose c, Verbose d, Verbose e) => Verbose (a, b, c, d, e) Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> (a, b, c, d, e) -> String Source #

(Verbose a, Verbose b, Verbose c, Verbose d, Verbose e, Verbose f) => Verbose (a, b, c, d, e, f) Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> (a, b, c, d, e, f) -> String Source #

vshowStr :: Maybe Int -> String -> String Source #

verbosely showing a string by the given length.

Example

>>> vshowStr (Just 3) "123456789"
"123.."
>>> vshowStr Nothing "123456789"
"123456789"

mnString :: Verbosity -> Maybe Int Source #

default length for a string representation in context of verbosity.

vshowList :: Verbose a => Verbosity -> Maybe Int -> String -> String -> [a] -> String Source #

verbosely showing a list by the given length.

Examples

>>> vshowList Full (Just 3) "[" "]" "abcdef"
"['a','b','c'..]"
>>> vshowList Low (Just 3) "{" "}" ["abcdef","ghijklmn","op","qrst","uvwxyz"]
"{['a','b'..],['g','h'..],['o','p']..}"

mnList :: Verbosity -> Maybe Int Source #

default number of entries for a list representation in context of verbosity.

Percent

newtype Percent x Source #

tagging for showing percentage of a Double.

Constructors

Percent x 

Instances

Instances details
Show x => Show (Percent x) Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

showsPrec :: Int -> Percent x -> ShowS #

show :: Percent x -> String #

showList :: [Percent x] -> ShowS #

Verbose (Percent Double) Source # 
Instance details

Defined in OAlg.Control.Verbose

showPercent :: Int -> Double -> String Source #

showing a double as percent with the given precision.

Example

>>> showPercent 2 0.912837
" 91.28%"