MissingH API ManualContentsIndex
MissingH.Printf.Types
Portabilityportable
Stabilityprovisional
MaintainerJohn Goerzen <jgoerzen@complete.org>
Description

This module is used internally by MissingH.Printf and is not intended to be used in your programs.

Copyright (c) 2004 John Goerzen, jgoerzen@complete.org

Portions Copyright (c) 2003 Ian Lynagh

Synopsis
data Value
= ValueRational Rational
| ValueString String
| ValueChar Char
showValue :: Value -> String
class PFType a where
toValue :: a -> Value
fromValue :: Value -> a
class PFRun a where
pfrun :: ([Value] -> String) -> a
class IOPFRun a where
iopfrun :: Handle -> ([Value] -> String) -> a
type ConversionFunc = Arg -> [Flag] -> Maybe Width -> Maybe Precision -> String
data Format
= Literal String
| Conversion ConversionFunc
| CharCount
type ArgNum = Integer
type Arg = Value
type Width = Integer
type Precision = Integer
data Flag
= AlternateForm
| ZeroPadded
| LeftAdjust
| BlankPlus
| Plus
| Thousands
| AlternativeDigits
xvar :: ArgNum -> String
yvar :: ArgNum -> String
nvar :: ArgNum -> String
Documentation
data Value
All items to be printed must be expressible as one of these.
Constructors
ValueRational Rational
ValueString String
ValueChar Char
show/hide Instances
Eq Value
Ord Value
Show Value
showValue :: Value -> String
class PFType a where
The class to which all items must belong (unless you want to inconvenience everyone and force them to manually generate Values.
Methods
toValue :: a -> Value
fromValue :: Value -> a
show/hide Instances
PFType Char
PFType Double
PFType Integer
PFType String
Real a => PFType a
class PFRun a where
Methods
pfrun :: ([Value] -> String) -> a
show/hide Instances
PFRun String
(PFType a, PFRun b) => PFRun (a -> b)
class IOPFRun a where
Methods
iopfrun :: Handle -> ([Value] -> String) -> a
show/hide Instances
(PFType a, IOPFRun b) => IOPFRun (a -> b)
IOPFRun (IO ())
type ConversionFunc = Arg -> [Flag] -> Maybe Width -> Maybe Precision -> String
data Format
Constructors
Literal String
Conversion ConversionFunc
CharCount
type ArgNum = Integer
type Arg = Value
type Width = Integer
type Precision = Integer
data Flag
Constructors
AlternateForm
ZeroPadded
LeftAdjust
BlankPlus
Plus
Thousands
AlternativeDigits
show/hide Instances
Eq Flag
Show Flag
xvar :: ArgNum -> String
yvar :: ArgNum -> String
nvar :: ArgNum -> String
Produced by Haddock version 0.7