ltk-0.8.0.6: Leksah tool kitSource codeContentsIndex
Text.PrinterParser
Description
Module for saving and restoring preferences and settings
Synopsis
type Printer beta = beta -> Doc
type Parser beta = CharParser () beta
data FieldDescriptionS alpha = FDS {
parameters :: Parameters
fieldPrinter :: alpha -> Doc
fieldParser :: alpha -> CharParser () alpha
}
type MkFieldDescriptionS alpha beta = Parameters -> Printer beta -> Parser beta -> Getter alpha beta -> Setter alpha beta -> FieldDescriptionS alpha
mkFieldS :: MkFieldDescriptionS alpha beta
applyFieldParsers :: a -> [a -> CharParser () a] -> CharParser () a
boolParser :: CharParser () Bool
intParser :: CharParser () Int
lineParser :: CharParser () String
pairParser :: CharParser () alpha -> CharParser () (alpha, alpha)
identifier :: CharParser st String
emptyParser :: CharParser () ()
whiteSpace :: CharParser st ()
stringParser :: CharParser () String
readParser :: Read a => CharParser () a
colorParser :: CharParser () Color
emptyPrinter :: () -> Doc
class Pretty a where
pretty :: a -> Doc
prettyPrec :: Int -> a -> Doc
prettyPrint :: Pretty a => a -> String
maybePP :: (a -> Doc) -> Maybe a -> Doc
symbol :: String -> CharParser st String
colon :: CharParser st String
writeFields :: FilePath -> alpha -> [FieldDescriptionS alpha] -> IO ()
showFields :: alpha -> [FieldDescriptionS alpha] -> String
readFields :: FilePath -> [FieldDescriptionS alpha] -> alpha -> IO alpha
parseFields :: alpha -> [FieldDescriptionS alpha] -> CharParser () alpha
Documentation
type Printer beta = beta -> DocSource
type Parser beta = CharParser () betaSource
data FieldDescriptionS alpha Source
Constructors
FDS
parameters :: Parameters
fieldPrinter :: alpha -> Doc
fieldParser :: alpha -> CharParser () alpha
type MkFieldDescriptionS alpha beta = Parameters -> Printer beta -> Parser beta -> Getter alpha beta -> Setter alpha beta -> FieldDescriptionS alphaSource
mkFieldS :: MkFieldDescriptionS alpha betaSource
applyFieldParsers :: a -> [a -> CharParser () a] -> CharParser () aSource
boolParser :: CharParser () BoolSource
intParser :: CharParser () IntSource
lineParser :: CharParser () StringSource
pairParser :: CharParser () alpha -> CharParser () (alpha, alpha)Source
identifier :: CharParser st StringSource
emptyParser :: CharParser () ()Source
whiteSpace :: CharParser st ()Source
stringParser :: CharParser () StringSource
readParser :: Read a => CharParser () aSource
colorParser :: CharParser () ColorSource
emptyPrinter :: () -> DocSource
class Pretty a whereSource
Things that can be pretty-printed
Methods
pretty :: a -> DocSource
Pretty-print something in isolation.
prettyPrec :: Int -> a -> DocSource
Pretty-print something in a precedence context.
prettyPrint :: Pretty a => a -> StringSource
pretty-print with the default style and defaultMode.
maybePP :: (a -> Doc) -> Maybe a -> DocSource
symbol :: String -> CharParser st StringSource
colon :: CharParser st StringSource
writeFields :: FilePath -> alpha -> [FieldDescriptionS alpha] -> IO ()Source
showFields :: alpha -> [FieldDescriptionS alpha] -> StringSource
readFields :: FilePath -> [FieldDescriptionS alpha] -> alpha -> IO alphaSource
parseFields :: alpha -> [FieldDescriptionS alpha] -> CharParser () alphaSource
Produced by Haddock version 2.6.0