ltk-0.10.0: Leksah tool kit

Text.PrinterParser

Description

Module for saving and restoring preferences and settings

Synopsis

Documentation

type Printer beta = beta -> DocSource

type Parser beta = CharParser () betaSource

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 alphaSource

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

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.

Instances

prettyPrint :: Pretty a => a -> StringSource

pretty-print with the default style and defaultMode.

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

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

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