Module for saving and restoring preferences and settings
- 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 Parser beta = CharParser () betaSource
data FieldDescriptionS alpha Source
FDS | |
|
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
pairParser :: CharParser () alpha -> CharParser () (alpha, alpha)Source
identifier :: CharParser st StringSource
whiteSpace :: CharParser st ()Source
readParser :: Read a => CharParser () aSource
emptyPrinter :: () -> DocSource
Things that can be pretty-printed
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
.
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