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

Safe HaskellSafe
LanguageHaskell2010

Text.Cassette.Char

Synopsis

Documentation

oneOf :: [Char] -> PP Char #

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

vowel = oneOf "aeiou"

noneOf :: [Char] -> PP Char #

Dual of oneOf.

skip :: (Char -> Bool) -> Char -> PP0 #

The satisfy combinator, unshifted.

skipSpace :: PP0 #

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

optSpace :: PP0 #

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 :: PP0 #

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 :: PP0 #

Parses a newline character ('\n').

tab :: PP0 #

Parses a tab character ('\t').

anyChar :: PP Char #

Any character.

char :: Char -> PP0 #

A specific character.