Safe Haskell | None |
---|---|
Language | Haskell98 |
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 () Text
- pairParser :: CharParser () alpha -> CharParser () (alpha, alpha)
- identifier :: CharParser st Text
- emptyParser :: CharParser () ()
- whiteSpace :: CharParser st ()
- stringParser :: CharParser () Text
- 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 -> Text
- maybePP :: (a -> Doc) -> Maybe a -> Doc
- symbol :: Text -> CharParser st Text
- colon :: CharParser st Text
- writeFields :: FilePath -> alpha -> [FieldDescriptionS alpha] -> IO ()
- showFields :: alpha -> [FieldDescriptionS alpha] -> Text
- readFields :: FilePath -> [FieldDescriptionS alpha] -> alpha -> IO alpha
- parseFields :: alpha -> [FieldDescriptionS alpha] -> CharParser () alpha
Documentation
type Parser beta = CharParser () beta Source
data FieldDescriptionS alpha Source
FDS | |
|
type MkFieldDescriptionS alpha beta = Parameters -> Printer beta -> Parser beta -> Getter alpha beta -> Setter alpha beta -> FieldDescriptionS alpha Source
mkFieldS :: MkFieldDescriptionS alpha beta Source
applyFieldParsers :: a -> [a -> CharParser () a] -> CharParser () a Source
boolParser :: CharParser () Bool Source
intParser :: CharParser () Int Source
lineParser :: CharParser () Text Source
pairParser :: CharParser () alpha -> CharParser () (alpha, alpha) Source
identifier :: CharParser st Text Source
emptyParser :: CharParser () () Source
whiteSpace :: CharParser st () Source
stringParser :: CharParser () Text Source
readParser :: Read a => CharParser () a Source
colorParser :: CharParser () Color Source
emptyPrinter :: () -> Doc Source
Things that can be pretty-printed
Nothing
Pretty-print something in isolation.
prettyPrec :: Int -> a -> Doc Source
Pretty-print something in a precedence context.
prettyPrint :: Pretty a => a -> Text Source
pretty-print with the default style and defaultMode
.
symbol :: Text -> CharParser st Text Source
colon :: CharParser st Text Source
writeFields :: FilePath -> alpha -> [FieldDescriptionS alpha] -> IO () Source
showFields :: alpha -> [FieldDescriptionS alpha] -> Text Source
readFields :: FilePath -> [FieldDescriptionS alpha] -> alpha -> IO alpha Source
parseFields :: alpha -> [FieldDescriptionS alpha] -> CharParser () alpha Source