MissingH API ManualContentsIndex
MissingH.Printf.Types
Portability portable
Stability provisional
Maintainer 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
Instances
Eq Value
Show Value
Ord 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
Instances
Real a => PFType a
PFType Integer
PFType Double
PFType String
PFType Char
class PFRun a where
Methods
pfrun :: ([Value] -> String) -> a
Instances
PFRun String
(PFType a, PFRun b) => PFRun (a -> b)
class IOPFRun a where
Methods
iopfrun :: Handle -> ([Value] -> String) -> a
Instances
IOPFRun (IO ())
(PFType a, IOPFRun b) => IOPFRun (a -> b)
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
Instances
Eq Flag
Show Flag
xvar :: ArgNum -> String
yvar :: ArgNum -> String
nvar :: ArgNum -> String
Produced by Haddock version 0.6