ltk-0.15.0.5: Leksah tool kit

Safe HaskellNone
LanguageHaskell98

Text.PrinterParser

Description

Module for saving and restoring preferences and settings

Synopsis

Documentation

type Printer beta = beta -> Doc #

type Parser beta = CharParser () beta #

data FieldDescriptionS alpha #

Constructors

FDS 

Fields

type MkFieldDescriptionS alpha beta = Parameters -> Printer beta -> Parser beta -> Getter alpha beta -> Setter alpha beta -> FieldDescriptionS alpha #

applyFieldParsers :: a -> [a -> CharParser () a] -> CharParser () a #

pairParser :: CharParser () alpha -> CharParser () (alpha, alpha) #

emptyPrinter :: () -> Doc #

class Pretty a where #

Things that can be pretty-printed

Methods

pretty :: a -> Doc #

Pretty-print something in isolation.

prettyPrec :: Int -> a -> Doc #

Pretty-print something in a precedence context.

Instances

Pretty Text # 

Methods

pretty :: Text -> Doc #

prettyPrec :: Int -> Text -> Doc #

prettyPrint :: Pretty a => a -> Text #

pretty-print with the default style and defaultMode.

maybePP :: (a -> Doc) -> Maybe a -> Doc #

writeFields :: FilePath -> alpha -> [FieldDescriptionS alpha] -> IO () #

showFields :: alpha -> [FieldDescriptionS alpha] -> Text #

readFields :: FilePath -> [FieldDescriptionS alpha] -> alpha -> IO alpha #

parseFields :: alpha -> [FieldDescriptionS alpha] -> CharParser () alpha #