cassette-0.1.0: A combinator library for simultaneously defining parsers and pretty printers.

Safe HaskellSafe-Infered

Text.Cassette.Char

Synopsis

Documentation

oneOf :: [Char] -> PP CharSource

Succeeds if the current character is in the supplied list of characters. See also satisfy.

 vowel = oneOf "aeiou"

noneOf :: [Char] -> PP CharSource

Dual of oneOf.

skip :: (Char -> Bool) -> Char -> PP0Source

The satisfy combinator, unshifted.

skipSpace :: PP0Source

skipSpace marks a position where whitespace is allowed to occur. It accepts arbitrary space while parsing, and produces no space while printing.

optSpace :: PP0Source

optSpace marks a position where whitespace is desired to occur. It accepts arbitrary space while parsing, and produces a single space character while printing.

sepSpace :: PP0Source

sepSpace marks a position where whitespace is required to occur. It requires one or more space characters while parsing, and produces a single space character while printing.

newline :: PP0Source

Parses a newline character ('\n').

tab :: PP0Source

Parses a tab character ('\t').

char :: Char -> PP0Source

A specific character.