ltk-0.14.0.0: Leksah tool kit

Safe HaskellNone
LanguageHaskell98

Text.PrinterParser

Description

Module for saving and restoring preferences and settings

Synopsis

Documentation

type Printer beta = beta -> Doc Source

type Parser beta = CharParser () beta Source

data FieldDescriptionS alpha Source

Constructors

FDS 

Fields

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 Source

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

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

class Pretty a where Source

Things that can be pretty-printed

Minimal complete definition

Nothing

Methods

pretty :: a -> Doc Source

Pretty-print something in isolation.

prettyPrec :: Int -> a -> Doc Source

Pretty-print something in a precedence context.

Instances

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

pretty-print with the default style and defaultMode.

maybePP :: (a -> Doc) -> Maybe a -> Doc 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